From 6257f2cb3be883aa2cdfa0ff0f92736b899e4573 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 70ad7b082..38fc70a69 100644 --- a/helpers/backup.py +++ b/helpers/backup.py @@ -268,7 +268,7 @@ class BackupService: 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(): @@ -519,7 +519,7 @@ class BackupService: 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: @@ -675,7 +675,7 @@ class BackupService: 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 abc0a982f..dda866c0b 100644 --- a/helpers/file_tree.py +++ b/helpers/file_tree.py @@ -507,7 +507,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 9adb83a2d..1dfb8a8b7 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(