cleo icon indicating copy to clipboard operation
cleo copied to clipboard

Cleo exceptions don't use pep8 naming conventions (and pep8-naming flake8 plugin doesn't seem to care)

Open danieleades opened this issue 3 years ago • 2 comments

Cleo's exceptions end in the suffix *Exception. PEP8 stipulates that exceptions should end in the suffix *Error. The pep8-naming flake8 extension is installed as a pre-commit hook, but is not triggering (for some reason).

see https://peps.python.org/pep-0008/#exception-names

danieleades avatar Jun 09 '22 12:06 danieleades

I investigated this a bit. pep8-naming is adding this error to default ignore of flake8 config here. I think it's to be adjusted in flake8 config.

Secrus avatar Jul 04 '22 10:07 Secrus

I tried activating the flake8 error, but with no luck. Might be just my lack of experience with configuring flake8. However, I don't think that *Exception is really wrong. I know it's not strictly in line with PEP8, but it's quite common to see it in projects.

Secrus avatar Jul 12 '22 23:07 Secrus