From 821981592646d00a116b8ea235f009e7d3a3cebc Mon Sep 17 00:00:00 2001 From: Martin Durant Date: Thu, 22 May 2025 10:58:32 -0400 Subject: [PATCH 1/2] Make "**" literal in glob docstring --- fsspec/spec.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fsspec/spec.py b/fsspec/spec.py index ed6653bcc..cc7659621 100644 --- a/fsspec/spec.py +++ b/fsspec/spec.py @@ -557,7 +557,7 @@ def glob(self, path, maxdepth=None, **kwargs): path: str The glob pattern to match against maxdepth: int or None - Maximum depth for '**' patterns. Applied on the first '**' found. + Maximum depth for ``'**'`` patterns. Applied on the first ``'**'`` found. Must be at least 1 if provided. **kwargs: Additional arguments passed to ``find`` (e.g., detail=True) @@ -570,7 +570,7 @@ def glob(self, path, maxdepth=None, **kwargs): ----- Supported patterns: - '*': Matches any sequence of characters within a single directory level - - '**': Matches any number of directory levels (must be an entire path component) + - ``'**'``: Matches any number of directory levels (must be an entire path component) - '?': Matches exactly one character - '[abc]': Matches any character in the set - '[a-z]': Matches any character in the range @@ -584,7 +584,7 @@ def glob(self, path, maxdepth=None, **kwargs): - Special characters in character classes are escaped properly Limitations: - - '**' must be a complete path component (e.g., 'a/**/b', not 'a**b') + - ``'**'`` must be a complete path component (e.g., ``'a/**/b'``, not ``'a**b'``) - No brace expansion ('{a,b}.txt') - No extended glob patterns ('+(pattern)', '!(pattern)') """ From 52b848a45cec72c6ff93787c3a6c714194679e1e Mon Sep 17 00:00:00 2001 From: Martin Durant Date: Thu, 22 May 2025 11:24:55 -0400 Subject: [PATCH 2/2] phase II --- fsspec/spec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsspec/spec.py b/fsspec/spec.py index cc7659621..5f6f9a104 100644 --- a/fsspec/spec.py +++ b/fsspec/spec.py @@ -559,7 +559,7 @@ def glob(self, path, maxdepth=None, **kwargs): maxdepth: int or None Maximum depth for ``'**'`` patterns. Applied on the first ``'**'`` found. Must be at least 1 if provided. - **kwargs: + kwargs: Additional arguments passed to ``find`` (e.g., detail=True) Returns