Commit bbf4ae0 1 parent 420e3bd commit bbf4ae0 Copy full SHA for bbf4ae0
File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 3
3
from __future__ import annotations
4
4
5
5
import fnmatch
6
- import glob
7
6
import re
8
7
from typing import Dict , List , Pattern
9
8
9
+ from wcmatch import glob
10
+
10
11
from bumpversion .config .models import FileChange
11
12
from bumpversion .exceptions import BumpVersionError
12
13
from bumpversion .versioning .models import VersionComponentSpec
@@ -76,10 +77,9 @@ def resolve_glob_files(file_cfg: FileChange) -> List[FileChange]:
76
77
A list of resolved file configurations according to the pattern.
77
78
"""
78
79
files : List [FileChange ] = []
79
- exclude_matcher = glob_exclude_pattern (file_cfg .glob_exclude or [])
80
- for filename_glob in glob .glob (file_cfg .glob , recursive = True ):
81
- if exclude_matcher .match (filename_glob ):
82
- continue
80
+ exclude = file_cfg .glob_exclude or []
81
+ glob_flags = glob .GLOBSTAR | glob .FORCEUNIX
82
+ for filename_glob in glob .glob (file_cfg .glob , flags = glob_flags , exclude = exclude ):
83
83
new_file_cfg = file_cfg .model_copy ()
84
84
new_file_cfg .filename = filename_glob
85
85
new_file_cfg .glob = None
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ dependencies = [
39
39
" rich-click" ,
40
40
" rich" ,
41
41
" tomlkit" ,
42
+ " wcmatch>=8.5.1" ,
42
43
]
43
44
44
45
[project .scripts ]
You can’t perform that action at this time.
0 commit comments