-
Notifications
You must be signed in to change notification settings - Fork 156
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
Add whitelist for the pint package #258
Conversation
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.
Thanks for the pull request @bje-!
I think that we need to think some more about shipping whitelists for non-stdlib modules with Vulture. I can think of the following options:
- We wrap the entire script in a try/except block which will only run if the module can be imported successfully.
- Use the proxy
Whitelist
module fromwhitelists/whitelist_utils.py
.
@jendrikseipp any thoughts?
I also had an initial worry that using common names (like in this case, default_format
) might be used too often altogether and that Vulture might miss them as false negatives, but now that I think of it, since we only import the whitelists only if the corresponding module is imported in user's program, I don't think this will be a problem.
Oh I just found out #208 (comment) from @jendrikseipp:
I too think this is a good idea, and I think, it answers all the questions above. @bje- can you add |
Like so? |
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 to me! Can you add a changelog entry, please?
Codecov Report
@@ Coverage Diff @@
## master #258 +/- ##
=======================================
Coverage 99.37% 99.37%
=======================================
Files 18 19 +1
Lines 635 638 +3
=======================================
+ Hits 631 634 +3
Misses 4 4
Continue to review full report at Codecov.
|
Thanks! |
And thank you! |
Self-evident.