mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Use GitIgnoreSpec in ts_utils.get_gitignore_spec (#13797)
This commit is contained in:
@@ -204,7 +204,7 @@ def allowlists(distribution_name: str) -> list[str]:
|
||||
@functools.cache
|
||||
def get_gitignore_spec() -> pathspec.PathSpec:
|
||||
with open(".gitignore", encoding="UTF-8") as f:
|
||||
return pathspec.PathSpec.from_lines("gitwildmatch", f.readlines())
|
||||
return pathspec.GitIgnoreSpec.from_lines(f)
|
||||
|
||||
|
||||
def spec_matches_path(spec: pathspec.PathSpec, path: Path) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user