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

Make flake8 respect configuration #311

Merged
merged 1 commit into from
Dec 13, 2022

Conversation

delfick
Copy link
Contributor

@delfick delfick commented Dec 12, 2022

Hello, I was having difficulty because it seemed flake8 didn't notice my settings, so I figured out that the pylsp flake8 plugin wasn't necessarily running in the correct directory, and also was telling all the plugins the filename was 'stdin' instead of the filename of the file

This also fixes the flake8 plugin when used with https://github.com/adamchainz/flake8-no-pep420 so that it doesn't complain all the files are in an implicit namespace

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @delfick for your contribution! I left a small suggestion to fix our tests, otherwise looks good to me.

test/plugins/test_flake8_lint.py Outdated Show resolved Hide resolved
@ccordoba12 ccordoba12 added this to the v1.7.0 milestone Dec 12, 2022
* ensure flake8 is run from the correct directory
* make flake8 aware of the filename being linted
@delfick delfick force-pushed the flake8/respect-local-config branch from abe9e6b to 047af22 Compare December 12, 2022 23:21
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @delfick!

@ccordoba12 ccordoba12 merged commit 59de0f8 into python-lsp:develop Dec 13, 2022
@delfick
Copy link
Contributor Author

delfick commented Dec 13, 2022

Thanks!

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