by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 19:43
    alexellison commented #725
  • 08:45
    dzieciou edited #1219
  • 08:44
    dzieciou edited #1219
  • 08:44
    dzieciou edited #1219
  • 08:43
    dzieciou edited #1219
  • 08:43
    dzieciou opened #1219
  • 06:28
    dzieciou opened #1218
  • 05:42

    timothycrosley on develop

    Fix issues uncovered by deepsou… (compare)

  • May 28 08:15
    dvirginz opened #1217
  • May 27 07:59
    schumannd commented #1007
  • May 27 07:17
    timothycrosley closed #1094
  • May 27 07:17
    timothycrosley commented #1094
  • May 27 07:15

    timothycrosley on gh-pages

    Deployed with MkDocs version: … (compare)

  • May 27 07:15

    timothycrosley on gh-pages

    Deployed with MkDocs version: … (compare)

  • May 27 07:13

    timothycrosley on gh-pages

    Deployed with MkDocs version: … (compare)

  • May 27 07:13

    timothycrosley on develop

    Improve documentation format fo… (compare)

  • May 27 06:56

    timothycrosley on develop

    Refactor options doc to separat… (compare)

  • May 26 20:00
    xmnlab opened #1216
  • May 26 15:58
    ryan-faculty commented #1007
  • May 26 15:52
    ryan-faculty edited #1215
Steven M. Vascellaro
@stevoisiak
In isort 4.3.4, import _tkinter is grouped as a third party import. Is this an intended behavior?
import tkinter

import _tkinter
import wfc_helper
For reference: _tkinter is a binary module containing the low-level interface to Tk. (documentation)
Lennart Grahl
@lgrahl
Hi everyone! I'm a bit puzzled by some inconsistent (?) behaviour of isort when using order_by_type = true. Someone here willing to take a look? :)
Catherine DeJager
@cmd16_gitlab
Hello! I'm trying to use Pylint for work, but our Python version is rather outdated - we're using Python 2.6. When I try to install isort using pip, it fails because Python version must be 2.7 or higher. Is there an older version of isort I can use?
Timothy Edmund Crosley
@timothycrosley
@cmd16_gitlab I would recommend installing isort with a newer Python, independent of the Python required to run your code. You can run isort on 2.7 against 2.6 code without issue.
@/all isort 4.3.5 has been officially released and represents the last release with official support for Python2.x https://github.com/timothycrosley/isort/releases/tag/4.3.5
This message was deleted
iGor milhit
@iGormilhit
Hi. Very recently, we pinned the isort version to be >=4.3.5, because it changes the import order for relative paths. But yesterday, isort was behaving like it was before version 4.3.5, and I checked, our project was using isort in version 4.3.10... So my question is, which behavior should we expect in the future? Thanks.
Timothy Edmund Crosley
@timothycrosley
@iGormilhit did this issue ever get fixed for you? isort had a series of hot fix releases, as a result of not being released in over a year
each one came with additional test cases
and it should be in a stable state now
iGor milhit
@iGormilhit
@timothycrosley Yeah, I think it's ok now. I asked because I was seeing changes, and reverse changes... Thanks for the good work, by the way. :smiley:
Serge Matveenko
@lig

Hey! I have a lind of missunderstanding.
I'm using isort on pre commit hook.
isort config:

line_length = 88
multi_line_output = 4
lines_after_imports = 2
skip_glob =
    migrations/**

and it works for isort -c -rc
but for pre commit hook migrations/** is being ignored 'cause it passes the file pass explictly like
isort migrations/versions/1234.py and that ignores skip_glob
is there a way to fix or workaround this behavior?
basically, I would like skip_glob to match even if file was provided explicitly using its full path

Timothy Edmund Crosley
@timothycrosley
@lig, sorry for the long delay getting back to you on this!
I've implemented a solution for your issue in the latest hot fix release: timothycrosley/isort#938
if you add --filter-files to a command line invocation of isort, it will now filter even the files you explicitly pass in
I hope this resolves your issue!
Justin Lee
@justinttl

Hi!

Quick question.
Trying to run isort on a django app. The output in CI (where app dependencies are not installed) is different then when I run it locally within a virtualenv.

isort -df output (ticketing and root_apps are first party modules)

 from django.contrib.postgres.fields import ArrayField
 from django.db import models
 from rest_framework import status
+
+from root_app.exceptions import StatusAPIError
 from sequences import get_next_value
-
-from root_app.exceptions import StatusAPIError
 from ticketing import TicketingErrorMessage
 from ticketing.constants import TICKET_SEQUENCE

Without a venv to point isort to, is there a way to tell isort to see if a module is first party by checking relative import paths?

Justin Lee
@justinttl
I have decided to use seed-isort-config to help with preseeding known third party library.
Would be great to see if isort will tackle this sort of environment dependent errors in the future by deprecating the import check logic
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 :)