Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: ignore N802 for methods marked with @override #215

Closed
Avasam opened this issue Apr 8, 2023 · 1 comment · Fixed by #217
Closed

Feature request: ignore N802 for methods marked with @override #215

Avasam opened this issue Apr 8, 2023 · 1 comment · Fixed by #217
Assignees

Comments

@Avasam
Copy link

Avasam commented Apr 8, 2023

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. A strong example of this is PyQt6/PySide6, where I have to keep adding to ignore-names as I use more and more features. pep8-naming 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).

; PyQt methods
ignore-names=closeEvent,paintEvent,keyPressEvent,mousePressEvent,mouseMoveEvent,mouseReleaseEvent
@jparise
Copy link
Member

jparise commented May 6, 2023

Good idea, @Avasam! I just merged a change that ignores methods decorated with @typing.override.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants