Skip to content

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

Merged
merged 9 commits into from
Sep 29, 2018
Merged

Conversation

ceh
Copy link
Contributor

@ceh ceh commented Sep 29, 2018

No description provided.

Copy link
Member

@gvanrossum gvanrossum left a 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.)

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
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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.

@ceh ceh force-pushed the remove-unused-imports branch from 673c158 to ea182ad Compare September 29, 2018 17:12
@gvanrossum gvanrossum merged commit b7926f2 into python:master Sep 29, 2018
@gvanrossum
Copy link
Member

Thanks again!

@ceh ceh deleted the remove-unused-imports branch September 29, 2018 21:04
TV4Fun pushed a commit to TV4Fun/mypy that referenced this pull request Oct 4, 2018
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