-
Notifications
You must be signed in to change notification settings - Fork 152
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
"unused import" false positives #192
Comments
I agree that we should fix these two cases. Would you like to write a pull request for either of the two cases? |
Let's fix the first case here. I'd raise a PR. |
Thinking about the first case again, I'm not sure whether we should do anything about it. In the example above, |
sorry i've not had time to help with any PR, but to clarify the first example:
|
Thanks for the example! However, |
true, the actual context i found this is in unit tests where we raise a custom exception/handling when the import is not found. in this case importing |
I agree. If you find an example where we should adapt Vulture, feel free to post it here. |
I think in the first example, you could simply just do |
Thanks for the nice tool. I've encountered a few "unused import" false positives recently of 2 types. 1st case is where the import is merely tested, e.g.:
2nd case is in
__init__.py
files, where it is common to import modules that are not directly used in the fileThe text was updated successfully, but these errors were encountered: