diff --git a/bundled/tool/server.py b/bundled/tool/server.py index e516af8..312b23e 100644 --- a/bundled/tool/server.py +++ b/bundled/tool/server.py @@ -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]: diff --git a/src/test/python_tests/test_code_actions.py b/src/test/python_tests/test_code_actions.py index bd1519d..12c0a5e 100644 --- a/src/test/python_tests/test_code_actions.py +++ b/src/test/python_tests/test_code_actions.py @@ -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]",