-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
bugSomething isn't workingSomething isn't workingpriority-0-highThis issue has a high priorityThis issue has a high priority
Description
Example source:
from memoization import cached
import inspect
class A:
@cached(ttl=1)
def b(self, name: str) -> int:
return len(name) * 2
def a(self) -> bool:
return self.b('hello') == 10
Using mypy for the above example gives the error:
/tmp/as-class.py:10: error: Too few arguments for "b" of "A"
/tmp/as-class.py:10: error: Argument 1 to "b" of "A" has incompatible type "str"; expected "A"
If you comment out the @cached
line, mypy gives the response:
Success: no issues found in 1 source file
pelson
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpriority-0-highThis issue has a high priorityThis issue has a high priority