Created
November 12, 2025 11:17
-
-
Save mypy-play/705ba5aaae9691b18153e1037cd00ca0 to your computer and use it in GitHub Desktop.
Shared via mypy Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import dataclasses | |
| @dataclasses.dataclass | |
| class Base: | |
| def fn(self, a: int) -> int: | |
| return a | |
| @dataclasses.dataclass | |
| class Child(Base): | |
| def fn(self, a: float) -> int: | |
| return int(a+3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment