-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugmypy got something wrongmypy got something wrong
Description
Relates to #5858 (fixed in #15926)
from typing import Callable
class something_callable:
def __init__(self, fn):
self.fn = fn
def __call__(self, decorated_self, extra1, extra2, extra3) -> str:
return self.fn(decorated_self)
# def __call__(self) is also bad
def decorator(fn: Callable[..., int]) -> something_callable:
return something_callable(fn)
class A:
@property
@decorator
def f(self) -> int:
return 42
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrong