Skip to content

Commit

Permalink
Add some missed improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
asnare committed Jul 12, 2024
1 parent 6c3a2e5 commit 5d625fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/databricks/labs/blueprint/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,12 +617,16 @@ def _prepare_pattern(self, pattern) -> Sequence[str]:

def glob(self, pattern, *, case_sensitive=None):
pattern_parts = self._prepare_pattern(pattern)
selector = _Selector.parse(pattern_parts, case_sensitive=case_sensitive if case_sensitive is not None else True)
if case_sensitive is None:
case_sensitive = True
selector = _Selector.parse(pattern_parts, case_sensitive=case_sensitive)
yield from selector(self)

def rglob(self, pattern, *, case_sensitive=None):
pattern_parts = ("**", *self._prepare_pattern(pattern))
selector = _Selector.parse(pattern_parts, case_sensitive=case_sensitive if case_sensitive is not None else True)
if case_sensitive is None:
case_sensitive = True
selector = _Selector.parse(pattern_parts, case_sensitive=case_sensitive)
yield from selector(self)


Expand Down

0 comments on commit 5d625fd

Please sign in to comment.