Melevir / flake8-functions-names

An extension for flake8 that validates functions names, decomposition and conformity with annotations.
MIT License
27 stars 9 forks source link

FNE005 for built-in dunder methods #16

Open aklajnert opened 2 years ago

aklajnert commented 2 years ago

Small code example:

def __eq__(self, other: Any) -> bool:
    return str(self) == str(other)

The plugin reports FNE005 Return type of the function is bool, but the name doesn't show it.
Since these are built-in methods, there's no way to rename them. I think in such cases this error shouldn't be reported. Applies also to other methods like __lt__(), __contains__() etc.