You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extension version (available under the Extensions sidebar): 2020.8
OS and version: Linux Ubuntu 20.04 x86_64
Python version (& distribution if applicable, e.g. Anaconda): 3.8.2
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
Relevant/affected Python packages and their versions: isort 5.5.1
Relevant/affected Python-related VS Code extensions and their versions: XXX
Value of the python.languageServer setting: Pylance
Expected behaviour
Invoking "Refactor: sort imports" runs isort and sorts import declarations in current document
Actual behaviour
Steps to reproduce:
install isort in venv
configure workspace to use custom isort
open Python file
invoke "Refactor: sort imports" from command palette
Logs
Output:
Error: Invalid patch string: import ast
Error 2020-09-09 20:35:15: Failed to format imports for '/home/jazg/work/bbbrating/server/setup.py'. [Error: Invalid patch string: import ast
at n.y (/home/jazg/.vscode/extensions/ms-python.python-2020.8.106424/out/client/extension.js:1:515081)
at v.getWorkspaceEditsFromPatch (/home/jazg/.vscode/extensions/ms-python.python-2020.8.106424/out/client/extension.js:1:518006)
at b._provideDocumentSortImportsEdits (/home/jazg/.vscode/extensions/ms-python.python-2020.8.106424/out/client/extension.js:56:895891)
at processTicksAndRejections (internal/process/task_queues.js:85:5)]
File setup.py begins with
importastimportcodecs
This generally fails on 1st import statement (other imports in other modules).
isort itself works OK and does not produce any error on this file.
The text was updated successfully, but these errors were encountered:
zgoda
added
triage-needed
Needs assignment to the proper sub-team
bug
Issue identified by VS Code Team member as probable bug
labels
Sep 9, 2020
Environment data
python.languageServer
setting: PylanceExpected behaviour
Invoking "Refactor: sort imports" runs isort and sorts import declarations in current document
Actual behaviour
Steps to reproduce:
Logs
Output:
File
setup.py
begins withThis generally fails on 1st import statement (other imports in other modules).
isort
itself works OK and does not produce any error on this file.The text was updated successfully, but these errors were encountered: