Giter VIP home page Giter VIP logo

Comments (9)

asottile avatar asottile commented on June 3, 2024 1

I can't reproduce. what is your file layout?

from reorder-python-imports.

asottile avatar asottile commented on June 3, 2024 1

yeah you've missed an important part of the README due to your directory structure

from reorder-python-imports.

asottile avatar asottile commented on June 3, 2024

you're going to have to provide more information to reproduce the problem

this isn't a problem with this tool -- it's something you've done

from reorder-python-imports.

mimo-404nf avatar mimo-404nf commented on June 3, 2024

I have my mypackage
and i am importing like so :

from lxml import etree
from mypackage import module

when i run the pre-commit it reorder them like so :

from mypackage import module
from lxml import etree

from reorder-python-imports.

mimo-404nf avatar mimo-404nf commented on June 3, 2024
  1. src/mypackage
  • utils.py

  • main_class.py

  • modules

    • submodule.py
      
    • _init__.py
      

in the submodule I am importing like so:

from lxml import etree
from mypackage.main_class import MyClass

when I use pre-commit run --all-files

the new imports order is like so:

from mypackage.main_class import MyClass
from lxml import etree

from reorder-python-imports.

asottile avatar asottile commented on June 3, 2024

have you read the readme? it addresses your problem

from reorder-python-imports.

mimo-404nf avatar mimo-404nf commented on June 3, 2024

what I'm mentioning that it order them in the wrong order the lxml shoud be before my local imports,
not after.

from reorder-python-imports.

mimo-404nf avatar mimo-404nf commented on June 3, 2024

Thsnks for your respond anyway, really appreciate it.

from reorder-python-imports.

mimo-404nf avatar mimo-404nf commented on June 3, 2024

aw thanks man really sorry I just added my application-dir and it's working perfectly.
sorry, my mistake.

from reorder-python-imports.

Related Issues (20)

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.