-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Remove unused imports #5694
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
Remove unused imports #5694
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! A few nits.
(Also, if you're looking to eradicate unneeded imports, if you find any import os.path
, those should become import os
.)
mypy/checkexpr.py
Outdated
true_only, false_only, is_named_instance, function_type, callable_type, FunctionLike, | ||
get_typ_args, StarType | ||
PartialType, DeletedType, UninhabitedType, TypeType, TypeOfAny, true_only, | ||
false_only, is_named_instance, function_type, callable_type, FunctionLike, StarType |
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.
Can you add a trailing comma? In lists like this that's how we like to format them.
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.
Fixed.
mypy/stats.py
Outdated
|
||
from collections import Counter | ||
from typing import Dict, List, cast, Optional | ||
from typing import cast, Counter, Dict, List, Optional |
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.
This doesn't seem right. It overrides the import of Counter
on the previous line. I think there's a reason why the code isn't doing that.
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.
Ah, you are correct. I missed this. Thanks for the helpful comment.
mypy/stats.py
Outdated
|
||
from collections import Counter | ||
from typing import Dict, List, cast, Optional | ||
from typing import cast, Counter, Dict, List, Optional |
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.
This doesn't seem right. It overrides the import of Counter
on the previous line. I think there's a reason why the code did what it did.
673c158
to
ea182ad
Compare
Thanks again! |
No description provided.