Linting to enforce PEP-585

Viewed 110

I'd like to be able to run some linting that fails if my code uses

from typing import List
x: List[str]

instead of

x: list[str]

for example.

I currently use mypy, so ideally there'd be some way to achieve this with that.

0 Answers
Related