-
Notifications
You must be signed in to change notification settings - Fork 227
Open
Description
Hello, I traced failing test report below
=========================== short test summary info ============================
FAILED test/plugins/test_flake8_lint.py::test_flake8_multiline - AssertionError: assert ['flake8', '-...W3,W6,B,B950'] == ['flake8', '-...h/...
============ 1 failed, 136 passed, 9 skipped, 7 warnings in 48.28s =============
back to the presence of a ~/.config/flake8 file that is picked up by pylsp/config/flake8_conf.py. The patch below makes the test succeed because it excludes extra options picked up from the configuration file.
--- a/test/plugins/test_flake8_lint.py
+++ b/test/plugins/test_flake8_lint.py
@@ -126,7 +126,7 @@ exclude =
flake8_lint.pylsp_lint(workspace, doc)
call_args = popen_mock.call_args[0][0]
- assert call_args == ["flake8", "-", "--exclude=blah/,file_2.py"]
+ assert call_args[3] == ["flake8", "-", "--exclude=blah/,file_2.py"]
os.unlink(os.path.join(workspace.root_path, "setup.cfg"))
However, according to the documentation section Flake8 Configuration Locations, flake8 looks for its configuration files (setup.cfg, tox.ini, and .flake8) only in its project or workspace directory. I would expect that pylsp would do the same to ensure identical flake8 messages from the command line and the server. Do you think it is worthwhile to propose a PR implementing this policy?
Metadata
Metadata
Assignees
Labels
No labels