Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add isort.order-by-type boolean setting #1607

Merged
merged 2 commits into from Jan 3, 2023

Commits on Jan 3, 2023

  1. Add isort.order-by-type boolean setting

    The default `isort` behavior is `order-by-type = true`.
    When imports are ordered by type:
    
    1. `CONSTANT_VARIABLES` are first.
    2. `CamelCaseClasses` are second.
    3. `everything_else` is third.
    
    - https://pycqa.github.io/isort/docs/configuration/options.html#order-by-type
    
    When `order-by-type = false` imports are ordered alphabetically (case-insensitive).
    
    eg.
    
    `order-by-type = false`
    
    ```py
    import BAR
    import bar
    import FOO
    import foo
    import StringIO
    from module import Apple, BASIC, Class, CONSTANT, function
    ```
    
    `order-by-type = true`
    
    ```py
    import BAR
    import bar
    import FOO
    import foo
    import StringIO
    from module import BASIC, CONSTANT, Apple, Class, function
    ```
    mattoberle committed Jan 3, 2023
    Configuration menu
    Copy the full SHA
    86b17f7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    12d25be View commit details
    Browse the repository at this point in the history