Closed
Description
describe the request
I'd like to be able to use hyphens in error codes so that I can have readable error codes that are name-spaced. For example, here's a list of some error codes we're currently using:
COMPANY-UNIT-TESTS-FILEPATH
COMPANY-FUNCTIONAL-TESTS-FILEPATH
COMPANY-PRINT-STATEMENTS
COMPANY-MOCK-ASSERT-METHODS
These codes work fine with noqa
directives. The only place they don't seem to work is in flake8 configuration files (such as setup.cfg). That is, the following config file crashes flake8:
[flake8]
per-file-ignores =
tests/test_flake8_plugin.py:COMPANY-UNIT-TESTS-FILEPATH
With the error:
There was a critical error during execution of Flake8:
Expected `per-file-ignores` to be a mapping from file exclude patterns to ignore codes.
Configured `per-file-ignores` setting:
tests/test_flake8_plugin.py:COMPANY-UNIT-TESTS-FILEPATH
I believe it comes down to this line:
Line 59 in 94ed800
The fix could be a simple update of the regex. I will put a patch together shortly to demonstrate a potential fix.
Metadata
Metadata
Assignees
Labels
No labels