-
Notifications
You must be signed in to change notification settings - Fork 2k
new rule - useless @final decorator on private method #24221
Copy link
Copy link
Open
Labels
needs-decisionAwaiting a decision from a maintainerAwaiting a decision from a maintainerruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Summary
Originally raised at astral-sh/ty#3140
Playground
main.py
from typing import final, override
class Foo:
@final # no error. should say something like "@final decorator is useless on private methods"
def __foo(self):
...
class Bar(Foo):
@override
def __foo(self): # correct error: Method `__foo` is decorated with `@override` but does not override anything
...Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs-decisionAwaiting a decision from a maintainerAwaiting a decision from a maintainerruleImplementing or modifying a lint ruleImplementing or modifying a lint rule