Skip to content

Incorrect order with pycharm style #41

@ev-agelos

Description

@ev-agelos

I am running zimports --multi-imports --style pycharm --black-line-length 88 (version 0.6.0)

getting:

from sqlalchemy import (
    Column,
    DateTime,
    func,
    insert,
    Integer,
    MetaData,
    select,
    String,
)

expected:

from sqlalchemy import (
    Column,
    DateTime,
    Integer,
    MetaData,
    String,
    func,
    insert,
    select,
)

I tried to debug a little bit and I think it goes wrong when the file gets parsed from ast. Seems that it returns the nodes in the tree with its own order and then no sort is happening from zimports, but im not sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions