Skip to content

Commit

Permalink
match pattern directly
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Sep 11, 2024
1 parent 614a62a commit 5b9a500
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions h5io_browser/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,7 @@ def _match_pattern(path_lst: list, pattern: Optional[str] = None) -> list:
list: List of paths which match the glob-syle pattern
"""
if pattern is not None:
path_pattern = PurePath(pattern)
return [p for p in path_lst if PurePath(p).match(path_pattern=path_pattern)]
return [p for p in path_lst if PurePath(p).match(path_pattern=pattern)]
else:
return path_lst

Expand Down

0 comments on commit 5b9a500

Please sign in to comment.