Doing variable: typing.Optional[typing.Self] = self
will fail
#16418
Labels
variable: typing.Optional[typing.Self] = self
will fail
#16418
Bug Report
If you do
variable: typing.Optional[typing.Self] = self
in method of your class, you will get a mypy error.To Reproduce
Expected Behavior
There should be no error.
Actual Behavior
You will get following error on
current = self
part.Your Environment
mypy (filename)
mypy.ini
(and other config files): NothingThe text was updated successfully, but these errors were encountered: