Skip to content

git_ignore documentation could be improved #1920

@Foryah

Description

@Foryah

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions