Code Monkey home page Code Monkey logo

Comments (4)

karthiknadig avatar karthiknadig commented on September 24, 2024 1

@amirkarimi Ruff is a multi-tool, it implements isort, flake8, and black formatter in rust. It is incredibly fast. So you can replace two tools with one. Ruff actually implements several other linter rules too (including but not limited to pylint, pyflakes, bandit, pycodestyle, pydocstyle, etc).

from vscode-isort.

karthiknadig avatar karthiknadig commented on September 24, 2024

@amirkarimi Check if you have a configuration file like setup.cfg where the order is being set. Also, this is a issue on isort library itself.

We recommend using ruff (see Ruff extension) for import sorting, as isort has not published a fix for the issues with running using stdin. We need to use stdin to handle cases where imports are organized on save.

from vscode-isort.

karthiknadig avatar karthiknadig commented on September 24, 2024

If you do install Ruff, be sure to remove isort extension, and add this to your settings ("source.organizeImports.ruff": true) in place of "source.organizeImports": true.

from vscode-isort.

amirkarimi avatar amirkarimi commented on September 24, 2024

Thanks @karthiknadig.

Check if you have a configuration file like setup.cfg where the order is being set.

The only config is in pyproject.toml which is not changing the :

[tool.isort]
profile = "black"
multi_line_output = 3

We recommend using ruff

Thanks will give it a try though we use isort and flake in our pre-commit stuff, I'd rather not change those.

I'm closing this issue since seems like nothing else can be done by the extension.

from vscode-isort.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.