From 09416d0750e9dee030ce7560e5162d2926cc2a45 Mon Sep 17 00:00:00 2001 From: Avasam Date: Mon, 7 Apr 2025 07:58:57 -0400 Subject: [PATCH] Use `GitIgnoreSpec` in `ts_utils.get_gitignore_spec` (#13797) --- lib/ts_utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ts_utils/utils.py b/lib/ts_utils/utils.py index 4df06665e..e4a687600 100644 --- a/lib/ts_utils/utils.py +++ b/lib/ts_utils/utils.py @@ -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: