-
Notifications
You must be signed in to change notification settings - Fork 14
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
DM-40156: Some code cleanups #869
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #869 +/- ##
==========================================
+ Coverage 87.76% 87.79% +0.03%
==========================================
Files 274 274
Lines 36057 36005 -52
Branches 7562 7535 -27
==========================================
- Hits 31645 31612 -33
+ Misses 3241 3227 -14
+ Partials 1171 1166 -5
☔ View full report in Codecov by Sentry. |
This does not affect the tests because these functions are used immediately inside the loop.
a = x if x else y instead of a = y if not x else x
Keep ones involving assertRaises and assertWarns since then it is easier to see the separation between the test code and the code being tested.
warnings.warn has too much other information that is irrelevant to the user of the command-line tool.
The test code doesn't really need it but it doesn't hurt and it makes it easier to find warnings in the future that lack the stacklevel.
assert can be removed as a no-op depending on how python is run.
lru_cache on methods doesn't work properly. Furthermore if we need to cache the collection type we should be caching it elsewhere inside registry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, a couple of minor comments.
Checklist
doc/changes