-
Notifications
You must be signed in to change notification settings - Fork 276
Closed
Description
Describe the Bug
Minimal repro:
class SomeCallable:
def __call__(self, x: int) -> str:
return "a"
class Descriptor:
def __get__(self, instance: object, owner: type | None = None) -> SomeCallable:
return SomeCallable()
class B:
__call__: Descriptor = Descriptor()
b_instance = B()
reveal_type(b_instance(1))Expected: reveals str
Actual: Expected a callable, got B
Sandbox Link
(Only applicable for extension issues) IDE Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels