Skip to content

Document --disallow-any=generics #3677

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 2 commits into from
Jul 7, 2017

Conversation

ilinum
Copy link
Collaborator

@ilinum ilinum commented Jul 7, 2017

No description provided.

``generics`` disallows usage of generic types that do not specify explicit
type parameters. Moreover, built-in collections (such as ``list`` and
``dict``) become disallowed as you should use their aliases from the typing
module (such as ``List`` and ``Dict``).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say here List[int] and Dict[str, str], since IIUC plain List and Dict are prohibited with this option as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that makes sense.
Updated!

@gvanrossum gvanrossum merged commit 7670ac9 into python:master Jul 7, 2017
@ilinum ilinum deleted the document-disallow-any=generics branch July 31, 2017 18:08
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.

3 participants