isort icon indicating copy to clipboard operation
isort copied to clipboard

git_ignore documentation could be improved

Open Foryah opened this issue 3 years ago • 0 comments

I was checking here if there's a way for isort to ignore the files from my .gitignore without requiring git installed (using it in a Jenkins pipeline with the --check flag). I stumbled upon git_ignore which looked promising and I had two issues with it:

  1. It didn't mention that it's only working when skip_gitignore is True which seems to be the case when you check the code
  2. It mentions that it should be set to True but the actual value it expects is a dict so it's very confusing how you should be using it

I think the documentation can be improved to make the previous two points clearer.

And a little bit of an offtopic: You think a feature to ignore the contents of .gitignore using basic regex instead of relying of git to be present is a good idea? I know for CI that would be great cause you usually use slim images that don't have a lot of system dependencies installed. Should we create an issue for this as well?

Foryah avatar Apr 21 '22 10:04 Foryah