GithubHelp home page GithubHelp logo

emacs-python-isort's People

Contributors

wbolster avatar wyuenho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

emacs-python-isort's Issues

What're the differences among these `isort` relevant packages: `py-isort`, `isortify`, and `python-isort`?

I noticed there are three isort relevant packges: py-isort, isortify, and python-isort. It seems that all these packages are designed to do the similar work: Use isort to sort the imports in a Python buffer. Considering that there are already similar projects, why do you still decide to create this new project? So, I want to know what're the differences among these isort relevant packages: py-isort, isortify, and python-isort.

Regards,
HZ

isort behavior inconsistent without explicit src paths

When using --profile black, isort will add a line break to separate different import blocks. Whether or not imports are correctly read as from a local module, and therefore in a separate block, depends on the working directory / src path. This means that if the src path isn't set, isort will behave inconsistently if triggered by this package or run locally.

Ideally this package would determine the src path dynamically for a given buffer and then pass that as a command-line argument to the isort command

If users include a pyproject.toml or .isort.cfg with the appropriate configuration block then this is not necessary

See configuration documentation here: https://pycqa.github.io/isort/docs/configuration/options#src-paths

`python-isort-buffer` doesn't work with isort `4.3.21`

When I run python-isort-buffer in a buffer, the following error is output:

Traceback (most recent call last):
  File "/home/thomashisch/.cache/pre-commit/repol3458474/py_env-python3/bin/isort", line 8, in <module>
    sys.exit(main())
  File "/home/thomashisch/.cache/pre-commit/repol3458474/py_env-python3/lib/python3.9/site-packages/isort/main.py", line 343, in main
    SortImports(file_=file_, write_to_stdout=True, **arguments)
TypeError: isort.isort.SortImports() got multiple values for keyword argument 'write_to_stdout'

in a *python-isort errors* buffer.

(note that the default value of python-isort-arguments is used)

Currently I can't upgrade to a newer isort version because I have to use this isort version for my projects.

Do you know how I can debug this? I wanted to reproduce this error on the command line by running

cat myfile | /home/thomashisch/.cache/pre-commit/repol3458474/py_env-python3/bin/isort --stdout --atomic -

but this worked.

Note that I don't have problems when I use python-isort-on-save-mode, but my --settings-path is not taken into account (I have included this path in `python-isort-arguements, but it is ignored)

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.