Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for flake8 per-file-ignores #902

Conversation

brandonwillard
Copy link

@brandonwillard brandonwillard commented Jan 17, 2021

This PR implements quick and dirty support for flake8's per-file-ignores option.

Changes to the list-type config parsing were necessary. Specifically, the parsing for multiline config settings, e.g.

[flake8]
ignores =
    E101,
    E102

needed to be altered to allow for multiple commas on a single line, because per-file-ignores takes a multiline list containing file names and comma separated lists of errors to be ignored:

[flake8]
per-file-ignores =
    foo.py: E101, E102
    bar.py: E101

@palantirtech
Copy link
Member

Thanks for your interest in palantir/python-language-server, @brandonwillard! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@brandonwillard brandonwillard force-pushed the flake8-per-file-ignores branch 2 times, most recently from e0fe243 to dc0f678 Compare January 17, 2021 05:35
@brandonwillard brandonwillard force-pushed the flake8-per-file-ignores branch from dc0f678 to 4644022 Compare January 17, 2021 05:44
@brandonwillard
Copy link
Author

brandonwillard commented May 1, 2021

Moved to python-lsp/python-lsp-server#28.

@brandonwillard brandonwillard deleted the flake8-per-file-ignores branch May 1, 2021 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants