-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 working
Description
In the below example we expect pyright to flag all 3 overrides as violations due to all methods decorated with @final in the base-class. However, only simple is flagged:
from functools import cache
from typing import final
class Parent:
@final
def simple(self):
...
@final
@cache
def final_over_cache(self):
...
@cache
@final
def cache_over_final(self):
...
class Child(Parent):
def simple(self):
...
@cache
def final_over_cache(self):
...
@cache
def cache_over_final(self):
...
Output:
>pyright pyright_final.py
pyright_final.py
pyright_final.py:24:9 - error: Method "simple" cannot override final method defined in class "Parent" (reportIncompatibleMethodOverride)
1 error, 0 warnings, 0 informations
Version information:
Python 3.10.11
pyright 1.1.401
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 working