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

Improve support for null atttibute values #406

Merged
merged 3 commits into from
Jan 16, 2024
Merged

Conversation

alexmv
Copy link
Contributor

@alexmv alexmv commented Jan 16, 2024

Rather than have these throw an assert at runtime, it is more useful to have them act as if the attribute did not exist.

Copy link
Owner

@Alir3z4 Alir3z4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some syntax sugar request to simplify the code readability.

Copy link

codecov bot commented Jan 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7ba8431) 97.24% compared to head (3a37da4) 97.22%.

❗ Current head 3a37da4 differs from pull request most recent head 66dd5ba. Consider uploading reports for the commit 66dd5ba to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #406      +/-   ##
==========================================
- Coverage   97.24%   97.22%   -0.02%     
==========================================
  Files          11       11              
  Lines        1124     1118       -6     
==========================================
- Hits         1093     1087       -6     
  Misses         31       31              
Flag Coverage Δ
unittests-3.10 97.22% <100.00%> (-0.02%) ⬇️
unittests-3.11 97.22% <100.00%> (-0.02%) ⬇️
unittests-3.12 97.22% <100.00%> (-0.02%) ⬇️
unittests-3.8 97.22% <100.00%> (-0.02%) ⬇️
unittests-3.9 97.22% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@Alir3z4
Copy link
Owner

Alir3z4 commented Jan 16, 2024

@alexmv Thanks for the fix, it's a pretty good catch.
I've left some comments, please let me know your feedback.

There are 2 files in conflicts as well as I've merged a big outstanding pull request #392

@alexmv
Copy link
Contributor Author

alexmv commented Jan 16, 2024

Rebased and repushed. As I commented above, the if "x" in thing and thing["x"] is not None pattern is apparently necessary for mypy type narrowing.

@alexmv alexmv requested a review from Alir3z4 January 16, 2024 21:22
@Alir3z4 Alir3z4 merged commit e375689 into Alir3z4:master Jan 16, 2024
9 checks passed
@Alir3z4
Copy link
Owner

Alir3z4 commented Jan 16, 2024

Thanks for the fix.
In the coming days, I'll cut a release and the change will be available on PyPI.

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.

2 participants