-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds investigation
Description
report "no organize imports action available" error in the editor area, but
isort output:
[Error - 9:02:40 AM] Syntax error in code: Traceback (most recent call last):
File "c:\Users\User\.vscode\extensions\ms-python.isort-2022.8.0\bundled\tool\server.py", line 291, in is_python
ast.parse(code)
File "c:\Program Files\Python311\Lib\ast.py", line 50, in parse
return compile(source, filename, mode, flags,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<unknown>", line 78
if r != '':
IndentationError: unexpected indent
[Warn - 9:02:40 AM] Skipping non python code: c:\test.py
[Error - 9:02:40 AM] Request textDocument/codeAction failed.
Message: AttributeError: 'NoneType' object has no attribute 'stdout'
Code: -32602
isort should only process the import ... part since it will not move the imports in methods to the head of the file anyway,
or isort should report the error correctly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds investigation