You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Python 3.11TypedDict can inherit from Generic which hasn't been possible so far. To use it in prior versions, TypedDict can be imported from typing_extensions. I believe it would make sense to postpone import rewriting for it until 3.11.
--
Besides TypedDict, NamedTuple will also be able to inherit from Generic in 3.11 or can be imported from typing_extensions. This isn't an issue yet though, since pyupgrade doesn't rewrite it.
In Python
3.11
TypedDict
can inherit fromGeneric
which hasn't been possible so far. To use it in prior versions,TypedDict
can be imported fromtyping_extensions
. I believe it would make sense to postpone import rewriting for it until3.11
.Example from the Python docs
After
pyupgrade --py38-plus
--
Besides
TypedDict
,NamedTuple
will also be able to inherit fromGeneric
in3.11
or can be imported fromtyping_extensions
. This isn't an issue yet though, since pyupgrade doesn't rewrite it.The text was updated successfully, but these errors were encountered: