We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code passes through mypy no problem:
class Foo: def __init__(self): self.foo = 123 def get_me(self) -> Foo: return self
According to https://www.python.org/dev/peps/pep-0484/#forward-references, this should be written as:
class Foo: def __init__(self): self.foo = 123 def get_me(self) -> 'Foo': return self
The text was updated successfully, but these errors were encountered:
Yeah, mypy should catch this issue. I think that there may be a duplicate issue about this open already. At least I remember a discussion about this.
Sorry, something went wrong.
Duplicate of #3088
No branches or pull requests
The following code passes through mypy no problem:
According to https://www.python.org/dev/peps/pep-0484/#forward-references, this should be written as:
The text was updated successfully, but these errors were encountered: