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
__init__
--check-untyped-defs
mypy v0.720
using --check-untyped-defs
class Foo: pass class A: def __init__(self) self.f1 = Foo() # Any reveal_type(self.f1) self.f2: Foo = Foo() # Foo reveal_type(self.f2) class B: def __init__(self) -> None: self.f1 = Foo() # Foo reveal_type(self.f1)
I would expect --check-untyped-defs would make A behave like B. However, some type inference seems missing if __init__ is not annotated.
A
B
The text was updated successfully, but these errors were encountered:
Related #5401, #4637
Sorry, something went wrong.
855076b
No branches or pull requests
mypy v0.720
using
--check-untyped-defs
I would expect
--check-untyped-defs
would makeA
behave likeB
. However, some type inference seems missing if__init__
is not annotated.The text was updated successfully, but these errors were encountered: