Isort: Current version skips every file on Travis

Created on 4 Mar 2019  路  4Comments  路  Source: PyCQA/isort

This PR #810 added a new check to skip some files/directories considered unsafe by default.

The regex excludes anything with build in the path, which usually would be ok.

However, Travis does its job by cloning to /home/travis/build/.

This effectively causes every file to be skipped by isort when running on Travis by default.

Using --unsafe or safety_excludes=False in the config solves the issue.

bug

Most helpful comment

This should be fixed in hotfix release 4.3.11: https://github.com/timothycrosley/isort/releases/tag/4.3.11

Thanks for reporting!

~Timothy

All 4 comments

I think the solution would be to avoid skipping paths if the path is passed explicitly on the command line. When no path is passed, assume the PWD is explicit. This way /home/travis/build wouldn't be checked.

CC @akx

This also affects the Nix build sandbox, which uses /build as its temporary directory. This causes all of isort's test that rely on files (e.g. test_other_file_encodings) to fail. This can be worked-around by setting TMPDIR, but is surprising.

Should be fixed in this pull request: https://github.com/timothycrosley/isort/pull/878

This should be fixed in hotfix release 4.3.11: https://github.com/timothycrosley/isort/releases/tag/4.3.11

Thanks for reporting!

~Timothy

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pradyunsg picture pradyunsg  路  3Comments

AlexandreYang picture AlexandreYang  路  3Comments

jack1142 picture jack1142  路  3Comments

lee-kagiso picture lee-kagiso  路  4Comments

johnthagen picture johnthagen  路  3Comments