Skip to content

Commit d2f369d

Browse files
committed
Adapt to fnmatch.translate() using \z instead of \Z in Python 3.14
1 parent fd70a10 commit d2f369d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyocd/subcommands/pack_cmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def _get_matches(self, cache: "cmsis_pack_manager.Cache") -> Set[str]:
5454
matches = set()
5555
for pattern in self._args.patterns:
5656
# Using fnmatch.fnmatch() was failing to match correctly.
57-
pat = re.compile(fnmatch.translate(pattern).rsplit('\\Z')[0], re.IGNORECASE)
57+
pat = re.compile(fnmatch.translate(pattern).rsplit('\\', 1)[0], re.IGNORECASE)
5858
results = {name for name in cache.index.keys() if pat.search(name)}
5959
matches.update(results)
6060

0 commit comments

Comments
 (0)