Skip to content

Commit

Permalink
Added quick fix for when flake8 triggers the "multiple spaces after k…
Browse files Browse the repository at this point in the history
…eyword" warning (#76)
  • Loading branch information
satya-vinay authored Nov 8, 2022
1 parent 41fcabe commit 064d56e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bundled/tool/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def code_action(params: lsp.CodeActionParams) -> List[lsp.CodeAction]:
return code_actions


@QUICK_FIXES.quick_fix(codes=["E273", "E274", "E275"])
@QUICK_FIXES.quick_fix(codes=["E271", "E273", "E274", "E275"])
def fix_format(
_document: workspace.Document, diagnostics: List[lsp.Diagnostic]
) -> List[lsp.CodeAction]:
Expand Down
9 changes: 9 additions & 0 deletions src/test/python_tests/test_code_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
@pytest.mark.parametrize(
("code", "contents", "command"),
[
(
"E271",
"from collections import (namedtuple, defaultdict)",
{
"title": f"{LINTER}: Run document formatting",
"command": "editor.action.formatDocument",
"arguments": None,
},
),
(
"E273",
"x = 1 in\t[1, 2, 3]",
Expand Down

0 comments on commit 064d56e

Please # to comment.