Skip to content

DISC: enable disallow_any_generics for mypy in setup.cfg? #30539

Open
@simonjayhawkins

Description

@simonjayhawkins

This flag 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[int] and Dict[str, str]).

Enabling this would address common pull request review comments. @WillAyd

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIContinuous IntegrationNeeds DiscussionRequires discussion from core team before further actionTypingtype annotations, mypy/pyright type checking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions