'Why does mypy ignores argument error with those errors are in a function?
In the following example, Example.__init__ and f_example takes not argument. Thus, mypy is supposed to warn if I try to pass some argument to them. However, when I apply mypy check to the following code, it does not warn nothing. Do I make mistake?
FYI, I also use pyright with vim and pyright warn about these errors as I expected.
class Example:
a: int
def __init__(self) -> None:
self.a = 0
def f_example():
return None
def test():
e = Example()
e2 = Example(1)
f_example()
f_example(1)
test()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
