pwoolvett / flake8_boolean_trap

A flake8 plugin to detect boolean traps.
10 stars 1 forks source link

Feature request: ignore `FBT001` and `FBT002` on methods marked with @override #11

Open ivanlonel opened 6 months ago

ivanlonel commented 6 months ago

Python 3.12 introduced the typing.override decorator, and typing_extensions backported it.

Overridden method signatures are out of the dev's control when subclassing an external library, so you can't just redefine a parameter as keyword-only. And if the base class is internal, the warning will already trigger in the original method definition anyway.

Similar idea to PyCQA/pep8-naming#217