When I enter option + shift + o on my Mac in a Python file in VSCode, I am given two options - "Sort imports" and "Organize Imports". They both organize the inputs nicely but in a different way, so I can keep flipping back and forth between the two of them. Why are there two different commands for this and is one preferred (i.e. more PEP8 compliant) than the other?
There are two because the Python extension created the Sort Imports command before VS Code introduced the Organize Imports command. So the Sort Imports command is the more "official" one for now.
There is an open issue, though, to transition over to Organize Imports at some point. Feel free to 👍 the issue if you would like to help bump its priority.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With