Open Koen1999 opened 10 months ago
This is duplicate of https://github.com/microsoft/vscode-isort/issues/303 . Basically providing Jupyter Support.
We recommend using ruff
(Ruff Extension) for import sorting. It implements same rules as isort and has notebook formatting support.
This is duplicate of #303 . Basically providing Jupyter Support.
We recommend using
ruff
(Ruff Extension) for import sorting. It implements same rules as isort and has notebook formatting support.
I would still argue this is a separate issue considering the error message shows up whenever I open a notebook without explicitly making use of any of the refactor functionality.
That is strange, would it be possible to share the logs?
That is strange, would it be possible to share the logs?
I am not sure exactly where I can find the complete logs, but this is the error message that VSCode shows in the UI.
Syntax error in code: Traceback (most recent call last): File "c:\Users\user\.vscode\extensions\ms-python.isort-2023.10.1\bundled\tool\lsp_server.py", line 293, in is_python ast.parse(code) File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\ast.py", line 50, in parse return compile(source, filename, mode, flags, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<unknown>", line 1 %matplotlib widget ^ SyntaxError: invalid syntax
Source: isort
It appears to concern a package that is bundled with isort.
If you can tell me where to find the logs, I can provide them.
In the output panel you can select isort in the drop down. See where it says "Python" on the right select "isort".
In the output panel you can select isort in the drop down. See where it says "Python" on the right select "isort".
Thanks for detailing this. Here are the logs I got in output after clearing the cache and restarting VS Code:
2024-02-07 11:10:51.010 [info] Name: isort
2024-02-07 11:10:51.010 [info] Module: isort
2024-02-07 11:10:51.010 [info] Python extension loading
2024-02-07 11:10:51.010 [info] Waiting for interpreter from python extension.
2024-02-07 11:10:53.088 [info] No interpreter found from setting isort.interpreter
2024-02-07 11:10:53.088 [info] Getting interpreter from ms-python.python extension for workspace c:\Users\user\project
2024-02-07 11:10:53.088 [info] Python extension loaded
2024-02-07 11:10:53.122 [info] Interpreter from ms-python.python extension for c:\Users\user\project: c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe
2024-02-07 11:10:53.127 [info] No interpreter found from setting isort.interpreter
2024-02-07 11:10:53.128 [info] Getting interpreter from ms-python.python extension for workspace c:\Users\user\project
2024-02-07 11:10:53.155 [info] Interpreter from ms-python.python extension for c:\Users\user\project: c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe
2024-02-07 11:10:53.253 [info] Server run command: c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe c:\Users\user\.vscode\extensions\ms-python.isort-2023.10.1\bundled\tool\lsp_server.py
2024-02-07 11:10:53.253 [info] Server: Start requested.
2024-02-07 11:10:56.673 [info] CWD Server: c:\Users\user\project
2024-02-07 11:10:56.673 [info] sys.path used to run Server:
c:\Users\user\.vscode\extensions\ms-python.isort-2023.10.1\bundled\libs
c:\Users\user\.vscode\extensions\ms-python.isort-2023.10.1\bundled\tool
C:\Users\user\AppData\Local\Programs\Python\Python311\python311.zip
C:\Users\user\AppData\Local\Programs\Python\Python311\DLLs
C:\Users\user\AppData\Local\Programs\Python\Python311\Lib
C:\Users\user\AppData\Local\Programs\Python\Python311
c:\Users\user\AppData\Local\Programs\Python\venv
c:\Users\user\AppData\Local\Programs\Python\venv\Lib\site-packages
c:\users\user\securityml\pcap-alter
c:\users\user\securityml\suricata-df
c:\users\user\securityml\kitsune
c:\users\user\securityml\deepcase
c:\Users\user\AppData\Local\Programs\Python\venv\Lib\site-packages\win32
c:\Users\user\AppData\Local\Programs\Python\venv\Lib\site-packages\win32\lib
c:\Users\user\AppData\Local\Programs\Python\venv\Lib\site-packages\Pythonwin
2024-02-07 11:10:56.674 [info] Settings used to run Server:
[
{
"check": true,
"cwd": "c:\\Users\\user\\project",
"workspace": "file:///c%3A/Users/user/project",
"args": [
"--profile",
"black"
],
"path": [],
"severity": {
"W": "Warning",
"E": "Hint"
},
"interpreter": [
"c:\\Users\\user\\AppData\\Local\\Programs\\Python\\venv\\Scripts\\python.exe"
],
"importStrategy": "useBundled",
"showNotifications": "onError"
}
]
2024-02-07 11:10:56.674 [info] Global settings:
{
"check": true,
"cwd": "C:\\Users\\user\\AppData\\Local\\Programs\\Microsoft VS Code",
"workspace": "C:\\Users\\user\\AppData\\Local\\Programs\\Microsoft VS Code",
"args": [
"--profile",
"black"
],
"path": [],
"severity": {
"W": "Warning",
"E": "Hint"
},
"interpreter": [],
"importStrategy": "useBundled",
"showNotifications": "onError"
}
2024-02-07 11:10:56.744 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort --version-number
2024-02-07 11:10:56.744 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:56.761 [info] Version info for isort running for C:\Users\user\project:
5.11.5
2024-02-07 11:10:56.762 [info] SUPPORTED isort>=5.10.1
FOUND isort==5.11.5
2024-02-07 11:10:56.788 [info] [Trace - 11:10:56 AM] Sending request 'textDocument/codeAction - (1)'.
2024-02-07 11:10:56.793 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.793 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:56.794 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.794 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:56.838 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.838 [info] ERROR: c:\Users\user\project\notebook.ipynb Imports are incorrectly sorted and/or formatted.
2024-02-07 11:10:56.839 [info] [Trace - 11:10:56 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:56.840 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.840 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:56.841 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.841 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:56.857 [info] [Trace - 11:10:56 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:56.858 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.859 [info] [Error - 11:10:56 AM] Syntax error in code: Traceback (most recent call last):
File "c:\Users\user\.vscode\extensions\ms-python.isort-2023.10.1\bundled\tool\lsp_server.py", line 293, in is_python
ast.parse(code)
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\ast.py", line 50, in parse
return compile(source, filename, mode, flags,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<unknown>", line 1
%matplotlib widget
^
SyntaxError: invalid syntax
2024-02-07 11:10:56.860 [info] [Trace - 11:10:56 AM] Received notification 'window/showMessage'.
2024-02-07 11:10:56.860 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.860 [info] [Warn - 11:10:56 AM] Skipping non python code: c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:56.861 [info] [Trace - 11:10:56 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:56.862 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.862 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:56.862 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.862 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:56.870 [info] [Trace - 11:10:56 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:56.874 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.874 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:56.874 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.875 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:56.891 [info] [Trace - 11:10:56 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:56.892 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.892 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:56.892 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.892 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:56.898 [info] [Trace - 11:10:56 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:56.904 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.904 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:56.906 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.906 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:56.910 [info] [Trace - 11:10:56 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:56.929 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.930 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:56.931 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.931 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:56.932 [info] [Trace - 11:10:56 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:56.937 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.937 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:56.938 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.938 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:56.939 [info] [Trace - 11:10:56 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:56.944 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.944 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:56.944 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.947 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:56.953 [info] [Trace - 11:10:56 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:56.956 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.956 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:56.956 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.957 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:56.964 [info] [Trace - 11:10:56 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:56.967 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.967 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:56.967 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.968 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:56.973 [info] [Trace - 11:10:56 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:56.978 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.978 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:56.978 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.978 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:56.986 [info] [Trace - 11:10:56 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:56.989 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.989 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:56.990 [info] [Trace - 11:10:56 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:56.991 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.009 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.014 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.014 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.014 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.014 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.022 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.029 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.029 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.037 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.038 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.046 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.048 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.048 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.049 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.049 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.068 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.069 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.069 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.070 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.070 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.077 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.080 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.080 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.081 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.081 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.106 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.107 [info] ERROR: c:\Users\user\project\notebook.ipynb Imports are incorrectly sorted and/or formatted.
2024-02-07 11:10:57.107 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.108 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.109 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.109 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.110 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.161 [info] [Trace - 11:10:57 AM] Sending notification '$/cancelRequest'.
2024-02-07 11:10:57.163 [info] [Trace - 11:10:57 AM] Sending request 'textDocument/codeAction - (2)'.
2024-02-07 11:10:57.224 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.224 [info] ERROR: c:\Users\user\project\notebook.ipynb Imports are incorrectly sorted and/or formatted.
2024-02-07 11:10:57.225 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.228 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.228 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.230 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.230 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.238 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.242 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.242 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.243 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.243 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.250 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.260 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.262 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.274 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.274 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.277 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.279 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.279 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.281 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.282 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.287 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.288 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.288 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.288 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.289 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.289 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.292 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.292 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.293 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.293 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.304 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.306 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.306 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.306 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.306 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.313 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.325 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.325 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.326 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.326 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.348 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.349 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.349 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.350 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.350 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.353 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.373 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.373 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.374 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.374 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.400 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.401 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.402 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.402 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.403 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.404 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.405 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.405 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.405 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.405 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.406 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.409 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.409 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.409 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.409 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.429 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.430 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.430 [info] c:\Users\user\AppData\Local\Programs\Python\venv\Scripts\python.exe -m isort - --profile black --check --filename c:\Users\user\project\notebook.ipynb
2024-02-07 11:10:57.430 [info] [Trace - 11:10:57 AM] Received notification 'window/logMessage'.
2024-02-07 11:10:57.430 [info] CWD Linter: C:\Users\user\project
2024-02-07 11:10:57.430 [info] [Trace - 11:10:57 AM] Received notification 'textDocument/publishDiagnostics'.
2024-02-07 11:10:57.457 [info] [Trace - 11:10:57 AM] Received response 'textDocument/codeAction - (1)' in 669ms.
2024-02-07 11:10:57.457 [info] [Trace - 11:10:57 AM] Received response 'textDocument/codeAction - (2)' in 294ms.
2024-02-07 11:10:57.724 [info] [Trace - 11:10:57 AM] Sending request 'textDocument/codeAction - (3)'.
2024-02-07 11:10:57.741 [info] [Trace - 11:10:57 AM] Received response 'textDocument/codeAction - (3)' in 17ms.
Isort cannot handle line magic in jupyter notebook
For example, having a cell with
%matplotlib widget
will cause isort to return: