| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Hey @dedi, thanks a lot for your contribution! Could you add a test for this? That way it won't regress in the future. |
Sorry, something went wrong.
|
Sure, sorry I missed that. The regression test is now there. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for your help @dedi!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Why this is needed:
In flake8, support for multiple ignores for the same pattern is allowed, but is currently not supported by the flake8 plugin.
If I have something like the following in my project's setup.cfg file:
Then running flake8 manually from the command line seems to behave as expected (ignore errors F401 and F403 from all __init__.py files), but running it from inside pylsp causes an error to be written to the log, and flake8 doesn't actually run. This small and admittedly not very elegant piece of code lets the flake8 plugin accept such a configuration.
(In fact, with my version of flake8 (3.8.4), I couldn't find any way to write the above which would work both under pylsp and when running flake8 manually. A configuration of the form
[flake8] per-file-ignores = __init__.py: F401 __init__.py: F403which seem to be valid according to the flake8 spec, doesn't actually make flake8 ignore both errors, so this fix is the only way I found to have a configuration which behaves identically when running either manually or under pylsp)
(edit: some typos. Sorry).