-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
astral-sh/ruff
#23180Labels
typing semanticstyping-module features, spec compliance, etctyping-module features, spec compliance, etc
Milestone
Description
Attributes which are qualified as Final may not be overwritten in subclasses (spec):
from typing import Final
class Base:
CONSTANT: Final[int] = 1
class Derived(Base):
CONSTANT = 2 # This should be an errorWe have an existing test (with TODOs) for this here.
I imagine that it might be convenient to implement this once we have #166 (because that would require similar mechanisms to look up equivalent attributes in base classes), but it might also make sense to implement this independently.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
typing semanticstyping-module features, spec compliance, etctyping-module features, spec compliance, etc