by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 09:36
    karrtikr commented #1363
  • 09:34
    karrtikr commented #1363
  • 05:51
    timothycrosley labeled #1369
  • 05:51
    timothycrosley labeled #1369
  • 05:51
    timothycrosley labeled #1369
  • 05:50
    timothycrosley closed #1370
  • 05:50
    timothycrosley commented #1370
  • 05:49
    timothycrosley closed #1365
  • 05:49
    timothycrosley commented #1365
  • 05:48
    timothycrosley commented #1363
  • 05:42
    timothycrosley commented #953
  • 05:42
    timothycrosley commented #1181
  • 05:41
    timothycrosley commented #1162
  • 05:41
    timothycrosley commented #1357
  • 05:40

    timothycrosley on 5.3.0

    (compare)

  • 05:39

    timothycrosley on master

    Fix linting error, needless f s… Resolve #1357: Add ability to t… black formatting and 31 more (compare)

  • 05:39

    timothycrosley on gh-pages

    Deployed with MkDocs version: … (compare)

  • 05:38

    timothycrosley on develop

    Bump version to 5.3.0 (compare)

  • 05:36
    timothycrosley demilestoned #1321
  • 05:35
    timothycrosley labeled #1321
Timothy Edmund Crosley
@timothycrosley
@justinttl agreed! This is part of the plan for the next major release of isort that is in the works
Ivan Ogasawara
@xmnlab
hey everyone! I am wondering if there is a way to move this PR timothycrosley/isort#1000 forward?
Timothy Edmund Crosley
@timothycrosley
Looking into it now! Thanks for helping to draw my attention to it
Timothy Edmund Crosley
@timothycrosley
Merge conflict is resolved and change is merged into develop branch
There is a number of changes (primarily the cut-over to Python3) that the develop branch represents
so it might be a week or so before I get a release out
Ivan Ogasawara
@xmnlab
sounds good! thanks @timothycrosley for working on that!
mostafa khaki
@mosi-kha
hi guys
how can I use virtual_env?
for example, I have a venv env for main run and third part packages in it but isort run in another environment lint
Ivan Ogasawara
@xmnlab
normally I just install isort in environment related to my project ... in another words .. I install isort into each project I am working (that needs isort)
Timothy Edmund Crosley
@timothycrosley
@mosi-kha, @xmnlab is correct that installing isort into the project will work to auto detect the virtual env. Otherwise there is a setting on isort to specify the virtual env, if you want to use one global installation:
--virtual-env
  --virtual-env VIRTUAL_ENV
                        Virtual environment to use for determining whether a
                        package is third-party
Ivan Ogasawara
@xmnlab
thanks @timothycrosley for the information! :)
Serge Matveenko
@lig

I've implemented a solution for your issue in the latest hot fix release: timothycrosley/isort#938

That's great!

Timothy Edmund Crosley
@timothycrosley
timothycrosley/isort#1123 For pycascade sprinters
timothycrosley/isort#1125 Ticket to update documentation for command line flags, and other changes with isort 5.0.0
Isaac Philip
@isaac-philip

kindly advise for,

wish to only output diff data with exit status other than 0

Timothy Edmund Crosley
@timothycrosley
Hi @isaac-philip, I believe this should work for you isort --check --diff
Isaac Philip
@isaac-philip
Thanks @timothycrosley
I couldnt find it in the help manual, should it be added?
Olivier DOSSMANN
@blankoworld
Hi all, just a question about a configuration: is there any config parameter to change behaviour in LOCALFOLDER paragraph to place "from .file import Something" BEFORE "from ..file import Something"?
Philip Meier
@pmeier
This message was deleted
Philip Meier
@pmeier

@timothycrosley Could you give me a minimal example on how to use the --virtual-env flag? Consider the
following hierarchy:

.
├── my_project
│   └── first_party_module.py
└── my_virtual_env
    ├── bin
    │   ├── isort
    │   └── python
    └── lib
        └── python3.6
            └── site-packages
                └── third_party_package.py

From timothycrosley/isort#659 I learned that the path has to be relative to my_project. Assume my current working directory is my_project. What do I pass to --virtual-env?

  • ../my_virtual_env
  • ../my_virtual_env/bin
  • ../my_virtual_env/lib
  • ../my_virtual_env/lib/python3.6
  • ../my_virtual_env/lib/python3.6/site-packages
Ivan Ogasawara
@xmnlab
@timothycrosley any updates about a new release? I would be happy if I can help in any way
Ivan Ogasawara
@xmnlab
hey everyone! this week using isort with pre-commit posixpath was changed from STDLIB to 3rd-party section (this is the pre-commit config file https://github.com/ibis-project/ibis/blob/master/.pre-commit-config.yaml#L7)
as the isort is pinned to a specific commit ... not sure what could be the problem ... I also opened a PR pinning pre-commit to 2.1 .. but no success ... does anyone has any idea about thsi issue? PS: I will open an issue for that, just checking here first if anyone has any idea :)
Sagi Shadur
@saroad2
Hey there, do you have a new release date for v5.0.0?
Timothy Edmund Crosley
@timothycrosley
Shrirang
@Shrirang97
First timer contributor
want to work on issue timothycrosley/isort#941
Shrirang
@Shrirang97
created branch issue/941
Timothy Edmund Crosley
@timothycrosley

First timer contributor
want to work on issue timothycrosley/isort#941

Hi @Shrirang97 Awesome! I'm excited to merge it in! Let me know if I can help you in any way and thanks for contributing to isort!

Shrirang
@Shrirang97
@timothycrosley I need your help to understand each input parameter for wrap_modes
import wrap_modes
print(wrap_modes.noqa(
            **{
                "comment_prefix": "-\U000bf82c\x0c\U0004608f\x10%",
                "comments": [],
                "imports": ['pandas','tensorflow'],
                "include_trailing_comma": False,
                "indent": "0\x19",
                "line_length": -19659,
                "line_separator": "\x15\x0b\U00086494\x1d\U000e00a2\U000ee216\U0006708a\x03\x1f",
                "remove_comments": False,
                "statement": "\U00092452",
                "white_space": "\U000a7322\U000c20e3-\U0010eae4\x07\x14\U0007d486",
            }
        ))
Timothy Edmund Crosley
@timothycrosley
@Shrirang97 , This must be the output of one of the autogenerated tests right?
They are meant to find unexpected errors, by trying truly outrageous values
Philip Meier
@pmeier
@timothycrosley any hints how to debug what is going wrong when isort gets stuck? I'm in the process to upgrading to isort==5.2.0and simply running isort . in my project root will get stuck after a few files.
Manually aborting gets me the following trace:
File "/home/philip/github/pystiche_papers/.venv/bin/isort", line 8, in <module>
    sys.exit(main())
  File "/home/philip/github/pystiche_papers/.venv/lib/python3.6/site-packages/isort/main.py", line 813, in main
    for sort_attempt in attempt_iterator:
  File "/home/philip/github/pystiche_papers/.venv/lib/python3.6/site-packages/isort/main.py", line 802, in <genexpr>
    sort_imports(  # type: ignore
  File "/home/philip/github/pystiche_papers/.venv/lib/python3.6/site-packages/isort/main.py", line 120, in iter_source_code
    if is_python_file(filepath):
  File "/home/philip/github/pystiche_papers/.venv/lib/python3.6/site-packages/isort/main.py", line 61, in is_python_file
    line = fp.readline(100)
KeyboardInterrupt
Timothy Edmund Crosley
@timothycrosley
@pmeier That sounds like an awful experience! I've never seen this before, but I was able to create a scenerio in which it could happen if I had recursive symbolic links since by default isort follows symbolic links
is it possible you have any in your project?
Timothy Edmund Crosley
@timothycrosley
If it is an issue caused by recursive symbolic links, the just released 5.2.1 update, which adds recursive link protection, should resolve your issue
Philip Meier
@pmeier
@timothycrosley 5.2.1 does not fix the problem. I just tried running it in a fresh clone and here it works fine. I guess I did something weird in my setup. I'll try to figure out what is going on and get back to you if I get stuck again.
Timothy Edmund Crosley
@timothycrosley
Glad to hear you got it working, but sorry it happened at all! Please let me know if it happens again, I'd love to resolve whatever case it is that you ran into
Philip Meier
@pmeier
@timothycrosley Found the offender: isort didn't hang, but was busy processing a dataset folder (~1,3 million images). I hadn't symlinked in the dataset in the fresh clone and thus it ran fine there.
Philip Meier
@pmeier
@timothycrosley I've found timothycrosley/isort#1359 while trying to fix this
Timothy Edmund Crosley
@timothycrosley
@pmeier Thanks for finding and reporting these issues!