Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created November 12, 2025 11:17
Show Gist options
  • Save mypy-play/705ba5aaae9691b18153e1037cd00ca0 to your computer and use it in GitHub Desktop.
Save mypy-play/705ba5aaae9691b18153e1037cd00ca0 to your computer and use it in GitHub Desktop.
Shared via mypy Playground
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