The following
from typing import Dict
import inspect
assert inspect.isclass(Dict[str, str]) is False
is rewritten as
import inspect
assert inspect.isclass(dict[str, str]) is False
which is broken for python3.10 (and 3.9 too I guess).
Traceback (most recent call last):
File "/tmp/pyupgrade39.py", line 8, in <module>
assert inspect.isclass(dict[str, str]) is False
AssertionError
it works for 3.11+
Same problem for list, tuple.
related issue: python/cpython#88459
related pr: python/cpython#93754