-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Description
This is another entry in the genre of confusing interactions between Mypy and attrs, extracted from #2088 by request of @gvanrossum. Let's start with an example:
import attr
@attr.s()
class A:
arg = attr.ib()
A(arg=1)
$ python -m mypy --ignore-missing-imports a.py
a.py:5: error: Unexpected keyword argument "arg" for "A"
Lib/mypy/typeshed/stdlib/3/builtins.pyi:39: note: "A" defined here
Mypy can't find A.__init__
, so it points to the stub for object.__init__
... but misreports it as the definition of A
.