module documentation

Pattern-matching utility functions for Sphinx.

Unknown Field: copyright
Copyright 2007-2022 by the Sphinx team, see AUTHORS.
Unknown Field: license
BSD, see LICENSE for details.
Constant DOTFILES Undocumented
Class ​Matcher A pattern matcher for Multiple shell-style glob patterns.
Function ​_translate​_pattern Translate a shell-style glob pattern to a regular expression.
Function compile​_matchers Undocumented
Function patfilter Return the subset of the list names that match the regular expression (pattern) pat.
Function patmatch Return if name matches the regular expression (pattern) pat`. Adapted from fnmatch module.
Variable ​_pat​_cache Undocumented
DOTFILES =

Undocumented

Value
Matcher(['**/.*'])
def _translate_pattern(pat):

Translate a shell-style glob pattern to a regular expression.

Adapted from the fnmatch module, but enhanced so that single stars don't match slashes.

Parameters
pat:strUndocumented
Returns
strUndocumented
def compile_matchers(patterns):

Undocumented

Parameters
patterns:List[str]Undocumented
Returns
List[Callable[[str], Optional[Match[str]]]]Undocumented
def patfilter(names, pat):

Return the subset of the list names that match the regular expression (pattern) pat.

Adapted from fnmatch module.

Parameters
names:Iterable[str]Undocumented
pat:strUndocumented
Returns
List[str]Undocumented
def patmatch(name, pat):
Return if name matches the regular expression (pattern) pat`. Adapted from fnmatch module.
Parameters
name:strUndocumented
pat:strUndocumented
Returns
Optional[Match[str]]Undocumented
_pat_cache: Dict[str, Pattern] =

Undocumented