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

--skip-gitignore does not honor ignored symlinks #1359

Closed
pmeier opened this issue Jul 31, 2020 · 1 comment
Closed

--skip-gitignore does not honor ignored symlinks #1359

pmeier opened this issue Jul 31, 2020 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@pmeier
Copy link

pmeier commented Jul 31, 2020

Consider the following project structure

$tree -a -L 3 -I .venv /home/user/testisort/
/home/user/testisort/
├── baz
│   └── baz.py
└── foo
    ├── bar
    │   └── bar.py
    ├── baz -> /home/user/testisort/baz
    ├── .git
    │   ├── branches
    │   ├── COMMIT_EDITMSG
    │   ├── config
    │   ├── description
    │   ├── HEAD
    │   ├── hooks
    │   ├── index
    │   ├── info
    │   ├── logs
    │   ├── objects
    │   └── refs
    └── .gitignore

11 directories, 8 files

with

$cat /home/user/testisort/foo/.gitignore
bar
baz

Running

$isort --skip-gitignore --check /home/user/testisort/foo

gives the following output

fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
ERROR: /home/user/testisort/baz/baz.py Imports are incorrectly sorted and/or formatted.

Thus, isort honors the --skip-gitignore for the directory bar, but ignores it for the symlink baz. The result is the same if I run if from within foo:

$cd /home/user/testisort/foo
$isort --skip-gitignore --check .
@timothycrosley timothycrosley added the bug Something isn't working label Aug 2, 2020
@timothycrosley timothycrosley added this to the 5.3.0 milestone Aug 2, 2020
@timothycrosley
Copy link
Member

Thanks for reporting this issue! This is fixed in develop and will find it's way on PyPI in release 5.3.0

Thanks!

~Timothy

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

2 participants