PyCQA / flake8

flake8 is a python tool that glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of some python code.

Home Page:https://flake8.pycqa.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow the enforcing of some type hint practices

AdrianB-sovo opened this issue · comments

describe the request

I would like an option to enforce some coding style for the type hints.
For example:

  • Enforce dict[str, Any] instead of Dict[str, Any] (and all the generic types from typing that are in the standard collection since 3.9).
  • Enforce TypeA | TypeB instead of Union[TypeA, TypeB].

use a plugin or formatter for it, pyupgrade helps

you'll note from the issue template that flake8 does not implement any checks