python-lsp / python-lsp-server

Fork of the python-language-server project, maintained by the Spyder IDE team and the community
MIT License
1.75k stars 186 forks source link

Introduce isort to check import order #501

Closed tkrabel closed 6 months ago

tkrabel commented 6 months ago

This is just me getting as many file changes into this project as possible for fame and glory 🎉

Fun aside, a couple of times already I had to address some import order things, and TBH, I am just not good at spotting that. That's why I think it's helpful using isort. Since we're using black as well, it's recommended to use the black profile for isort.

This PR adds isort checks to the static code analysis pipeline and runs isort --profile black on the repo once.

tkrabel commented 6 months ago

@ccordoba12 this addresses https://github.com/python-lsp/python-lsp-server/pull/499#discussion_r1435370352

tkrabel commented 6 months ago

Actually, using ruff is even better. https://github.com/python-lsp/python-lsp-server/pull/502