Skip to content

Glob Check Should Be Relative to pyproject.toml Directory #1

@sco1

Description

@sco1

Missed this part when initially going through the PEP

Per PEP 639:

Path delimiters MUST be the forward slash character (/). Patterns are relative to the directory containing pyproject.toml, therefore the leading slash character MUST NOT be used.

Currently the hook is written to check relative to the current working directory. This is probably going to be equivalent in most cases, but might as well make it more correct. Because the hook should be explicitly matching pyproject.toml, we should be able to assume the parent of the file received by the hook as our base directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions