Open alonme opened 1 year ago
You can use it via Organize Import
command. You can turn off "source.organizeImports"
by removing this from your settings.
Also running into this, running the underlying commands on the command line:
cat foo.py | ./backend/.venv/bin/python -m isort - --filename foo.py
takes about 660ms (not great)
while saving a file in vscode with isort
enabled takes ~4000ms
edit: I don't remember the vscode-python extension (https://github.com/microsoft/vscode-python/issues/7042) having the same issue
@karthiknadig - i don't want to remove it - as i want it to run on save, however since updating to the new version (and disabling the isort
extension) - my previous configuration does not work..
i am looking for a way to understand why it doesn't run / make it run again
@sbdchd @alonme Can you share the logs from output > isort after setting isort.loglevel
to debug?
my previous configuration does not work
We are migrating to this extension so the isort
feature in python extension is now handled via this extension. So, it does not work if you disable this. You could revert to python extension from september 2022 and that should still support the old way. Meanwhile we will continue to work with isort
(upstream) to diagnose and resolve these issues.
I've since switched to Ruff to handle import sorting so I'm not longer able to reproduce
It is also extremely slow for me.
I also faced a similar problem. I'm not sure why, but I solved it by reinstalling the extension.
We recommend using ruff
as well. It uses the same server underneath as this extension, but ruff
itself is incredibly fast. Since it also handles formatting like black
it can do import sorting and code formatting in one step.
vscode Version: 1.73.1 python extension version: v2022.18.2 isort extension version: v2022.6.0
The extension makes saving files very slow (around 5 seconds).
This was not the experience when i was using the isort in the past with this config.
also - i can't seem to find a way to use isort as i was doing before?