alexcouper / captainhook

Git hook scripts
BSD 3-Clause "New" or "Revised" License
54 stars 14 forks source link

isort check fails for valid files with isort >=4.1.0 #94

Closed mknecht closed 8 years ago

mknecht commented 8 years ago

isort considers the file valid, but the check fails because no output is expected — but isort now always displays a logo in the command-line.

The changelog entry:

Added the isort logo to the command line interface

Example run of captainhook without errors, but still rejecting the commit:

$ captainhook run
===============================================================================
Checking isort
===============================================================================
/#######################################################################\

     `sMMy`
     .yyyy-                                                      `
    ##soos##                                                    ./o.
          `     ``..-..`         ``...`.``         `   ```` ``-ssso```
     .s:-y-   .+osssssso/.     ./ossss+:so+:`    :+o-`/osso:+sssssssso/
     .s::y-   osss+.``.``     -ssss+-.`-ossso`   ssssso/::..::+ssss:::.
     .s::y-   /ssss+//:-.`   `ssss+     `ssss+   sssso`       :ssss`
     .s::y-   `-/+oossssso/  `ssss/      sssso   ssss/        :ssss`
     .y-/y-       ````:ssss`  ossso.    :ssss:   ssss/        :ssss.
     `/so:`    `-//::/osss+   `+ssss+-/ossso:    /sso-        `osssso/.
       \/      `-/oooo++/-      .:/++:/++/-`      ..           `://++/.

         isort your Python imports for you so you don't have to

                            VERSION 4.1.2

\########################################################################/

===============================================================================
Rejecting commit
===============================================================================

Two solutions:

I'd favor the first, tested it locally, and would open a PR, if needed.

alexcouper commented 8 years ago

Option 1 is fine I think, we define the dependency in setup.py, so fixing that to anything above 4.1.1 is fine for me.