linter-flake8
linter-flake8 copied to clipboard
Ignore error codes and max line length configuration ignored
Hey all,
I have a fresh install of Atom 1.23.3 and I've installed the linter-flake8 package and its dependencies. I shouldn't have nor did I manage to find any alternative configuration files, yet the ignore error codes and max line length configurations do not seem to make a difference even though the ~/.atom/config.cson file is updated accordingly.
Atom config:
config.cson:
editor:
I've never actually posted an issue and am relatively new to all this, so I hope it makes sense. Thank you for your awesome work! Zvi
Hey @ZviBaratz , do you have any file named setup.cfg
, tox.ini
or .flake8
in the root of your project?
None of the above. I do have a config.py file, however, I even tried renaming that file and still no luck.
Here's the root tree:
Perhaps it is worth noting I previously worked with PyCharm? Could that somehow interfere?
Could well be a bug here. I do not think most python dev who care about pep8 compliance would change the line length… I certainly do not.
I only tried changing the line length due to the E501 ignore failure, and frankly, I only tried to ignore E501 because wrapping didn't solve it. I was also surprised to learn wrapping indents the line continuation to the beginning of the previous line instead of indenting further. Is there a way to customise that? I much prefer the PyCharm-like appearance of line continuation. Example:
I'm starting a long-term commitment, contributing to a well-established project that is configured to allow longer line lengths. I don't have the ability to change the project's conventions, so even though it might be ideal to have a 79-char enforcement, that's not my reality. It would be lovely to have this addressed if at all possible!
Ah! Update! In my case, part of the problem was because of the default ordering of the Project Config File
setting. The project I'm working on has both a tox.ini
and a setup.cfg
. The max-line-length
value (exception) is in the setup.cfg
in this project, which doesn't get picked up (presumably because the package sees tox.ini
first and uses that). By swapping around the ordering of Project Config File
in my settings—putting setup.cfg
first—I can "fix" this for this project (i.e. line length maxima are correctly set to the project's setup.cfg
value).
However, this doesn't address this issue—as, as far as I can tell, the package's "Max Line Length" and "Ignore Error Codes" don't work (at least not with respect to E501
) without the configuration file, but as a workaround, a configuration file with a max-line-length
rule does appear to work.
'Ignore Error Codes' still doesn't work, right? Or did someone find a workaround? Cheers
I ran into a variant of this. I have the max line length linter-flake8
configuration set to 100 characters. I would expect that to be the setting, regardless of any other files in the project. However, it happens that there is a setup.cfg
where that config has:
[flake8]
exclude = extern,*parsetab.py,*lextab.py
There is no max-line-length
mentioned, but atom-linter
seems to take the lack of an explicit max-line-length
to mean use the default 80 no matter what (even overriding my value in the linter-flake8
config). That seems like a bug. If I put max-line-length = 100
in the setup.cfg
file then 100 is the value which gets used.
I have the same problem. Cleaned up any config files and restarted atom to no avail. I use black for formatting so formatting messages are just noise for me and line length is set at 88 per Łukasz Langa wisdom.
Maybe it's a problem into the instalation itself, you can check this link if you want and you may find how to install the docstring of python Fix-Linter-flak8.
I have the same problem too. If these configuration options are ignored, they should be removed from the package settings.
Same issue here. Any updates on this?