Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 Raise ValueError when trying to search a None value #2294

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

Zethson
Copy link
Member

@Zethson Zethson commented Dec 18, 2024

Fixes #2292

Like @Koncopd pointed out, search assumes a string. However, in practice I sometimes ran into cases where earlier pieces of (lamindb) code returned None which led to this error. I'm not a fan of too defensive programming in general but I think that this one is fine.

@Zethson Zethson marked this pull request as ready for review December 18, 2024 09:41
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.86%. Comparing base (2a17099) to head (b5522c2).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2294      +/-   ##
==========================================
+ Coverage   92.82%   92.86%   +0.03%     
==========================================
  Files          55       55              
  Lines        7202     7214      +12     
==========================================
+ Hits         6685     6699      +14     
+ Misses        517      515       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: zethson <[email protected]>
Copy link

github-actions bot commented Dec 18, 2024

@Zethson Zethson merged commit 614c61d into main Dec 18, 2024
13 checks passed
@Zethson Zethson deleted the feature/defensive_search branch December 18, 2024 10:01
@github-actions github-actions bot temporarily deployed to pull request December 18, 2024 10:08 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Searching for a None value leads to AttributeError: 'NoneType' object has no attribute 'strip'
1 participant