Skip to content

Commit

Permalink
Fix glob_match on Python 3.13+.
Browse files Browse the repository at this point in the history
(cherry picked from commit 1b0be9e)
  • Loading branch information
woess authored and jerboaa committed Dec 5, 2024
1 parent 8353bb3 commit 4a4b599
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/mx.sdk/mx_sdk_shaded.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ def glob_match(path, pattern):
"""
assert isinstance(path, PurePath), path
if sys.version_info[:2] >= (3, 13):
# Since Python 3.13, PurePath.match already supports '**'.
return path.match(pattern)
# Python 3.13+: PurePath.full_match already supports '**'.
return path.full_match(pattern)

pathType = type(path)
patternParts = pathType(pattern).parts
Expand Down

0 comments on commit 4a4b599

Please sign in to comment.