Coder Social home page Coder Social logo

pre-commit-isort's People

Contributors

bagerard avatar fdhadzh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pre-commit-isort's Issues

isort behaves differently when in hook

When run in a hook, isort is changing correct imports to incorrect ones. In particular, it is moving imports from first party code (i.e. this project) into the 3rd party code block.

I'm guessing this is because when the hook runs, it sees only the modified files, therefore is not able to deduce first party imports correctly. This can be fixed by using known_first_party in your isort settings. Is there a better solution? At the very least it would be good if this problem and solution could be documented in the instructions.

Something about this hook breaks isort

I'm trying to run isort via this hook on our codebase, but it performs erratically. Try running the hook on the following file:

la = """
from foo import bar
"""

The hook will insert a newline after the import, in the string. Running isort manually doesn't do that.

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.