python-lsp / python-lsp-server

Fork of the python-language-server project, maintained by the Spyder IDE team and the community
MIT License
1.76k stars 186 forks source link

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

Closed smacke closed 10 months ago

smacke commented 10 months ago

This PR implements the solution proposed in https://github.com/python-lsp/python-lsp-server/issues/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 commented 10 months ago

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

smacke commented 10 months ago

Done!