You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.12 will introduce the override decorator. It is already backported by typing_extensions.
Overridden method names are out of the dev's control when subclassing an external library. An example of this are Enum's _generate_next_value_. Ruff could understand that there's nothing the dev can do about the names if a method is marked with @override (and it'll still raise anyway on the base class if it's internal).
The text was updated successfully, but these errors were encountered:
Avasam
changed the title
Feature request: ignore _generate_next_value_ for methods marked with @override
Feature request: ignore PLW3201 for methods marked with @overrideAug 28, 2023
## Summary
Closes#6958.
If a method has the `override` decorator, there is nothing you can do
about incorrect dunder methods, so they should be ignored.
## Test Plan
Overridden incorrect dunder method was added to the tests to verify ruff
doesn't catch it when evaluating the file. Snapshot changes are all just
line number changes
Same request and reasoning as #3910
Python 3.12 will introduce the
override
decorator. It is already backported bytyping_extensions
.Overridden method names are out of the dev's control when subclassing an external library. An example of this are Enum's
_generate_next_value_
. Ruff could understand that there's nothing the dev can do about the names if a method is marked with@override
(and it'll still raise anyway on the base class if it's internal).The text was updated successfully, but these errors were encountered: