From 09e062715bb1f45559710e1848d71f399a1e84ec Mon Sep 17 00:00:00 2001 From: linkliti Date: Thu, 26 Mar 2026 17:27:22 +0300 Subject: [PATCH] Fix DeprecationWarning --- helpers/backup.py | 6 +++--- helpers/file_tree.py | 2 +- plugins/_promptinclude/helpers/scanner.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helpers/backup.py b/helpers/backup.py index 0100fdf77c..a2b9d67810 100644 --- a/helpers/backup.py +++ b/helpers/backup.py @@ -261,7 +261,7 @@ async def test_patterns(self, metadata: Dict[str, Any], max_files: int = 1000) - processed_count = 0 try: - spec = PathSpec.from_lines("gitwildmatch", pattern_lines) + spec = PathSpec.from_lines("gitignore", pattern_lines) # Walk through base directories for base_pattern_path, base_real_path in self.base_paths.items(): @@ -507,7 +507,7 @@ async def preview_restore( if pattern_lines: from pathspec import PathSpec - restore_spec = PathSpec.from_lines("gitwildmatch", pattern_lines) + restore_spec = PathSpec.from_lines("gitignore", pattern_lines) # Process each file in archive for archive_path in archive_files: @@ -663,7 +663,7 @@ async def restore_backup( if pattern_lines: from pathspec import PathSpec - restore_spec = PathSpec.from_lines("gitwildmatch", pattern_lines) + restore_spec = PathSpec.from_lines("gitignore", pattern_lines) # Process each file in archive for archive_path in archive_files: diff --git a/helpers/file_tree.py b/helpers/file_tree.py index b08361e60e..acc1101d11 100644 --- a/helpers/file_tree.py +++ b/helpers/file_tree.py @@ -502,7 +502,7 @@ def _resolve_ignore_patterns(ignore: str | None, root_abs_path: str) -> Optional if not lines: return None - return PathSpec.from_lines("gitwildmatch", lines) + return PathSpec.from_lines("gitignore", lines) def _list_directory_children( diff --git a/plugins/_promptinclude/helpers/scanner.py b/plugins/_promptinclude/helpers/scanner.py index 9adb83a2df..1dfb8a8b70 100644 --- a/plugins/_promptinclude/helpers/scanner.py +++ b/plugins/_promptinclude/helpers/scanner.py @@ -131,7 +131,7 @@ def _build_ignore_spec(gitignore: str) -> PathSpec | None: ] if not lines: return None - return PathSpec.from_lines("gitwildmatch", lines) + return PathSpec.from_lines("gitignore", lines) def _find_matching_files(