Skip to content

Commit ae395cb

Browse files
committed
Specialize PathSpec
1 parent 0eee459 commit ae395cb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/ts_utils/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,12 @@ def close(self: TemporaryFileWrapper[str]) -> None:
261261

262262

263263
@functools.cache
264-
def get_gitignore_spec() -> pathspec.PathSpec:
264+
def get_gitignore_spec() -> pathspec.GitIgnoreSpec:
265265
with GITIGNORE_PATH.open(encoding="UTF-8") as f:
266266
return pathspec.GitIgnoreSpec.from_lines(f)
267267

268268

269-
def spec_matches_path(spec: pathspec.PathSpec, path: Path) -> bool:
269+
def spec_matches_path(spec: pathspec.PathSpec[Any], path: Path) -> bool:
270270
normalized_path = path.as_posix()
271271
if path.is_dir():
272272
normalized_path += "/"

0 commit comments

Comments
 (0)