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

Don't set cwd in Popen kwargs when document root is empty (flake8) #434

Merged

Conversation

smacke
Copy link
Contributor

@smacke smacke commented Sep 7, 2023

This PR implements the solution proposed in #406 to not set the cwd keyword argument in the flake8 process runner whenever the document root is empty. This helps prevent errors in windows, which apparently doesn't like an empty cwd.

Fixes #406.

@ccordoba12 ccordoba12 added this to the v1.8.0 milestone Sep 7, 2023
@ccordoba12 ccordoba12 added the bug Something isn't working label Sep 7, 2023
@ccordoba12 ccordoba12 changed the title dont set cwd in popen kwargs when document root is empty Don't set cwd in Popen kwargs when document root is empty (flake8) Sep 7, 2023
@ccordoba12
Copy link
Member

@smacke, please run Black in the file you changed to make this one pass our linting workflow. The code looks good to me.

@smacke
Copy link
Contributor Author

smacke commented Sep 8, 2023

Done!

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.

Nice job, thanks @smacke!

@ccordoba12 ccordoba12 merged commit e837c55 into python-lsp:develop Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flake8_lint plugin: Popen fails when no workspace given by language server client on Windows
2 participants