Skip to content

PathSpec.match_file() returns None since 0.12.0 #84

@adrienverge

Description

@adrienverge

Hello @cpburnz, and thanks for maintaining pathspec 👍

Since release 0.12.0 and the change of signature of PathSpec.match_file() from bool to Tuple[Optional[bool], Optional[int]], yamllint tests fail. New errors looks like:

self.assertEqual(c.ignore.match_file('test.yaml'), False)
AssertionError: None != False

(↑ c.ignore is an instance of pathspec.PathSpec)

These seem easy to fix, but I wanted to ask first. I don't understand why None is a better return value? I guessed maybe it's a small bug?

I look at all commits in this new release and found 92a9066 "Improve debugging", I read it but it's not clear to me.

Looking forward to know more about this. Thanks! 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions