Skip to content
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

Do not import List, Dict, and Set by default #2863

Merged
merged 6 commits into from
Feb 14, 2017

Conversation

ilevkivskyi
Copy link
Member

Fix #999

This is a straightforward fix: List, Set, and Dict are treated as aliases to their builtins counterparts, therefore they are ignored by remove_imported_names_from_symtable, I fix this by also removing the alias names.

This depends on python/typeshed#933 + sync typeshed

The fix also revealed few places in mypy where imports were missing.

@gvanrossum
Copy link
Member

Thanks! You can add the typeshed sync to this PR yourself.

@gvanrossum
Copy link
Member

I need to test this carefully against our internal codebases and I'm having some problems with that due to the typed-ast change. Bear with me.

@ilevkivskyi
Copy link
Member Author

I also see this strange typed_ast error, it didn't appear before I (finally) synced typeshed.

@ilevkivskyi
Copy link
Member Author

I fixed the typed_ast issue (looks like a simple oversight) in a new commit I pushed here.

@gvanrossum gvanrossum merged commit f576e84 into python:master Feb 14, 2017
@gvanrossum
Copy link
Member

Thanks! Now I need to focus on other stuff.

@ilevkivskyi ilevkivskyi deleted the no-inmport-list branch February 14, 2017 19:48
@ilevkivskyi
Copy link
Member Author

Thank you!

Now I need to focus on other stuff.

Sure, no problem, take your time!
(I will make few more PRs soon, maybe others will have time to take a look)

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.

Dict, List and Set are imported by default
2 participants