-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugmypy got something wrongmypy got something wrong
Description
Example code:
class Banana:
@property
def size(self) -> int:
return 42
@size.setter
async def size(self, value: int, /) -> None:
print(f"set value to {value!r}")
b = Banana()
b.size = 42I expected mypy to complain that the setter function doesn't return None and returns Coroutine[Any, Any, None] instead. Similarly, if the setter is a non-async function returning e.g. str or int, no error is reported.
Environment
- Mypy version used: 1.19.1
- Mypy command-line flags:
--strict - Python version used: 3.14
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrong