I'm using the excellent Elpy. I have with a Python project with a .flake8
config file at the top of the project source tree. I have this content in the .flake8
file:
[flake8]
ignore = E251, E501, E303, E271, E221, E226
per-file-ignores =
admin/export-data:E241,E304
(export-data
is a Python script in the subdirectory admin/
of the project.) Elpy running Flymake clearly reads the configuration file and correctly reads the globally-ignored error codes: I can see the effect of adding or removing error code values in the ignore
line. However, the per-file settings for the file admin/export-data
are not being recognized. At first, I thought the problem was the file path, so I tried variations such as just export-data
, using the absolute path to export-data
, and so on, and nothing seems to change the behavior: the per-file-ignores
setting is itself ignored. Yet it works if I run flake8
in a terminal, outside of Emacs.
Is there a trick to getting the flake8
/Elpy/Flymake combination to recognize the per-file-ignores
setting?