-
Notifications
You must be signed in to change notification settings - Fork 1.8k
False negative: override of @final property #9795
Copy link
Copy link
Closed
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't workingspec compliance
Description
The typing spec indicates that @final should be enforced for properties, but pyright doesn't emit an error in this case.
from typing import final
class Base:
@final
@property
def prop(self) -> int:
return 1
class Child(Base):
# This should result in an error.
@property
def prop(self) -> int:
return 2Refer to this thread.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't workingspec compliance