Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current version skips every file on Travis #873

Closed
JoseKilo opened this issue Mar 4, 2019 · 4 comments
Closed

Current version skips every file on Travis #873

JoseKilo opened this issue Mar 4, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@JoseKilo
Copy link

JoseKilo commented Mar 4, 2019

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.

@jdufresne
Copy link
Collaborator

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

@kwohlfahrt
Copy link

kwohlfahrt commented Mar 5, 2019

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.

@timothycrosley
Copy link
Member

Should be fixed in this pull request: #878

@timothycrosley
Copy link
Member

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

Thanks for reporting!

~Timothy

@timothycrosley timothycrosley added the bug Something isn't working label Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants