sdkagent

wcmatch API reference

100 public APIs from wcmatch (facelessuser/wcmatch) — 22 classes, 37 functions, 41 methods. Signatures extracted by static analysis of the actual source.

Repository: facelessuser/wcmatch

KindCount
Classes22
Functions37
Methods41

API list

classhatch_build.CustomMetadataHook
Our metadata hook.
classwcmatch.__meta__.Version
Get the version (PEP 440).
funcwcmatch.__meta__.parse_version(ver:str) -> Version
Parse version into a comparable Version tuple.
classwcmatch._wcmatch.WcMatcher
Pre-compiled matcher object.
classwcmatch._wcmatch.WcRegexp
File name match object.
methodwcmatch._wcmatch.WcRegexp.filter(filenames:Iterable[AnyStr | os.PathLike[AnyStr]], root_dir:AnyStr | os.PathLike[AnyStr] | None=None, dir_fd:int | None=None) -> list[AnyStr | os.PathLike[AnyStr]]
Filter filenames.
methodwcmatch._wcmatch.WcRegexp.match(filename:AnyStr | os.PathLike[AnyStr], root_dir:AnyStr | os.PathLike[AnyStr] | None=None, dir_fd:int | None=None) -> bool
Filter filenames.
classwcmatch._wcparse.DotException
Dot exception.
classwcmatch._wcparse.ExtPromote
Promote extended group object.
classwcmatch._wcparse.InvPlaceholder
Placeholder for inverse pattern !(...).
classwcmatch._wcparse.PathNameException
Path name exception.
classwcmatch._wcparse.PatternLimitException
Pattern limit exception.
classwcmatch._wcparse.WcParse
Parse the wildcard pattern.
methodwcmatch._wcparse.WcParse.clean_up_inverse(current:list[str], nested:bool=False) -> None
Clean up current.
methodwcmatch._wcparse.WcParse.consume_path_sep(i:util.StringIter) -> None
Consume any consecutive path separators as they count as one.
methodwcmatch._wcparse.WcParse.parse() -> AnyStr
Parse pattern list.
methodwcmatch._wcparse.WcParse.parse_extend(c:str, i:util.StringIter, current:list[str], reset_dot:bool=False, parent:str='') -> bool
Parse extended pattern lists.
methodwcmatch._wcparse.WcParse.reset_dir_track() -> None
Reset directory tracker.
methodwcmatch._wcparse.WcParse.root(pattern:str, current:list[str]) -> None
Start parsing the pattern.
methodwcmatch._wcparse.WcParse.set_after_start() -> None
Set tracker for character after the start of a directory.
methodwcmatch._wcparse.WcParse.set_start_dir() -> None
Set directory start.
methodwcmatch._wcparse.WcParse.update_dir_state() -> None
Update the directory state.
classwcmatch._wcparse.WcSplit
Class that splits patterns on |.
methodwcmatch._wcparse.WcSplit.parse_extend(c:str, i:util.StringIter) -> bool
Parse extended pattern lists.
methodwcmatch._wcparse.WcSplit.split() -> Iterable[AnyStr]
Split the pattern.
funcwcmatch._wcparse.compile(patterns:AnyStr | Sequence[AnyStr], flags:int, limit:int=PATTERN_LIMIT, exclude:AnyStr | Sequence[AnyStr] | None=None) -> WcRegexp[AnyStr]
Compile patterns.
funcwcmatch._wcparse.compile_pattern(patterns:AnyStr | Sequence[AnyStr], flags:int, limit:int=PATTERN_LIMIT, exclude:AnyStr | Sequence[AnyStr] | None=None) -> tuple[list[Pattern[AnyStr]], list[Pattern[AnyStr]]]
Compile the patterns.
funcwcmatch._wcparse.escape(pattern:AnyStr, unix:bool | None=None, pathname:bool=True) -> AnyStr
Escape.
funcwcmatch._wcparse.escape_drive(drive:str, case:bool) -> str
Escape drive.
funcwcmatch._wcparse.expand(pattern:AnyStr, flags:int, limit:int) -> Iterable[AnyStr]
Expand and normalize.
funcwcmatch._wcparse.expand_braces(patterns:AnyStr, flags:int, limit:int) -> Iterable[AnyStr]
Expand braces.
funcwcmatch._wcparse.expand_tilde(pattern:AnyStr, is_unix:bool, flags:int) -> AnyStr
Expand tilde.
funcwcmatch._wcparse.get_case(flags:int) -> bool
Parse flags for case sensitivity settings.
funcwcmatch._wcparse.is_case_sensitive(flags:int) -> bool
Is case sensitive.
funcwcmatch._wcparse.is_magic(pattern:AnyStr, flags:int=0) -> bool
Check if pattern is magic.
funcwcmatch._wcparse.is_negative(pattern:AnyStr, flags:int) -> bool
Check if negative pattern.
funcwcmatch._wcparse.is_unix_style(flags:int) -> bool
Check if we should use Unix style.
funcwcmatch._wcparse.iter_patterns(patterns:AnyStr | Sequence[AnyStr]) -> Iterable[AnyStr]
Return a simple string sequence.
funcwcmatch._wcparse.no_negate_flags(flags:int) -> int
No negation.
funcwcmatch._wcparse.split(pattern:AnyStr, flags:int) -> Iterable[AnyStr]
Split patterns.
funcwcmatch._wcparse.tilde_pos(pattern:AnyStr, flags:int) -> int
Is user folder.
funcwcmatch._wcparse.translate(patterns:AnyStr | Sequence[AnyStr], flags:int, limit:int=PATTERN_LIMIT, exclude:AnyStr | Sequence[AnyStr] | None=None) -> tuple[list[AnyStr], list[AnyStr]]
Translate patterns.
classwcmatch.fnmatch.WcMatcher
Pre-compiled matcher object.
methodwcmatch.fnmatch.WcMatcher.filter(filenames:Iterable[AnyStr]) -> list[AnyStr]
Match filename.
methodwcmatch.fnmatch.WcMatcher.match(filename:AnyStr) -> bool
Match filename.
funcwcmatch.fnmatch.compile(patterns:AnyStr | Sequence[AnyStr], flags:int=0, limit:int=_wcparse.PATTERN_LIMIT, exclude:AnyStr | Sequence[AnyStr] | None=None) -> WcMatcher[AnyStr]
Pre-compile a matcher object.
funcwcmatch.fnmatch.escape(pattern:AnyStr) -> AnyStr
Escape.
funcwcmatch.fnmatch.filter(filenames:Iterable[AnyStr], patterns:AnyStr | Sequence[AnyStr], *flags:int=0, *limit:int=_wcparse.PATTERN_LIMIT, *exclude:AnyStr | Sequence[AnyStr] | None=None) -> list[AnyStr]
Filter names using pattern.
funcwcmatch.fnmatch.fnmatch(filename:AnyStr, patterns:AnyStr | Sequence[AnyStr], *flags:int=0, *limit:int=_wcparse.PATTERN_LIMIT, *exclude:AnyStr | Sequence[AnyStr] | None=None) -> bool
Check if filename matches pattern.
funcwcmatch.fnmatch.is_magic(pattern:AnyStr, *flags:int=0) -> bool
Check if the pattern is likely to be magic.
funcwcmatch.fnmatch.translate(patterns:AnyStr | Sequence[AnyStr], *flags:int=0, *limit:int=_wcparse.PATTERN_LIMIT, *exclude:AnyStr | Sequence[AnyStr] | None=None) -> tuple[list[AnyStr], list[AnyStr]]
Translate `fnmatch` pattern.
classwcmatch.glob.Glob
Glob patterns.
methodwcmatch.glob.Glob.glob() -> Iterator[AnyStr]
Starts off the glob iterator.
classwcmatch.glob.WcMatcher
Pre-compiled matcher object.
methodwcmatch.glob.WcMatcher.filter(filenames:Iterable[AnyStr | os.PathLike[AnyStr]], *root_dir:AnyStr | os.PathLike[AnyStr] | None=None, *dir_fd:int | None=None) -> list[AnyStr | os.PathLike[AnyStr]]
Match filename.
methodwcmatch.glob.WcMatcher.match(filename:AnyStr | os.PathLike[AnyStr], *root_dir:AnyStr | os.PathLike[AnyStr] | None=None, *dir_fd:int | None=None) -> bool
Match filename.
funcwcmatch.glob.compile(patterns:AnyStr | Sequence[AnyStr], *flags:int=0, *limit:int=_wcparse.PATTERN_LIMIT, *exclude:AnyStr | Sequence[AnyStr] | None=None) -> WcMatcher[AnyStr]
Pre-compile a matcher object.
funcwcmatch.glob.escape(pattern:AnyStr, unix:bool | None=None) -> AnyStr
Escape.
funcwcmatch.glob.glob(patterns:AnyStr | Sequence[AnyStr], *flags:int=0, *root_dir:AnyStr | os.PathLike[AnyStr] | None=None, *dir_fd:int | None=None, *limit:int=_wcparse.PATTERN_LIMIT, *exclude:AnyStr | Sequence[AnyStr] | None=None) -> list[AnyStr]
Glob.
funcwcmatch.glob.iglob(patterns:AnyStr | Sequence[AnyStr], *flags:int=0, *root_dir:AnyStr | os.PathLike[AnyStr] | None=None, *dir_fd:int | None=None, *limit:int=_wcparse.PATTERN_LIMIT, *exclude:AnyStr | Sequence[AnyStr] | None=None) -> Iterator[AnyStr]
Glob.
funcwcmatch.glob.is_magic(pattern:AnyStr, *flags:int=0) -> bool
Check if the pattern is likely to be magic.
funcwcmatch.glob.translate(patterns:AnyStr | Sequence[AnyStr], *flags:int=0, *limit:int=_wcparse.PATTERN_LIMIT, *exclude:AnyStr | Sequence[AnyStr] | None=None) -> tuple[list[AnyStr], list[AnyStr]]
Translate glob pattern.
methodwcmatch.pathlib.Path.glob(patterns:str | Sequence[str], *flags:int=0, *limit:int=_wcparse.PATTERN_LIMIT, *exclude:str | Sequence[str] | None=None) -> Iterable['Path']
Search the file system.
methodwcmatch.pathlib.Path.rglob(patterns:str | Sequence[str], *flags:int=0, *limit:int=_wcparse.PATTERN_LIMIT, *exclude:str | Sequence[str] | None=None) -> Iterable['Path']
Recursive glob.
classwcmatch.pathlib.PosixPath
Posix path.
classwcmatch.pathlib.PurePath
Special pure pathlike object that uses our own glob methods.
classwcmatch.pathlib.PurePosixPath
Pure Posix path.
classwcmatch.pathlib.PureWindowsPath
Pure Windows path.
classwcmatch.pathlib.WindowsPath
Windows path.
funcwcmatch.posix.get_posix_property(value:str, limit_ascii:bool=False) -> str
Retrieve the POSIX category.
classwcmatch.util.Immutable
Immutable.
classwcmatch.util.StringIter
Preprocess replace tokens.
methodwcmatch.util.StringIter.advance(count:int) -> None
Advanced the index.
methodwcmatch.util.StringIter.index() -> int
Get current index.
methodwcmatch.util.StringIter.match(pattern:Pattern[str], update:bool=True) -> Match[str] | None
Perform regex match at index.
methodwcmatch.util.StringIter.match_next(pattern:Pattern[str], update:bool=True) -> Match[str] | None
Perform regex match at index.
methodwcmatch.util.StringIter.previous() -> str
Get previous char.
methodwcmatch.util.StringIter.rewind(count:int) -> None
Rewind index.
funcwcmatch.util.is_case_sensitive() -> bool
Check if case sensitive.
funcwcmatch.util.is_hidden(path:AnyStr) -> bool
Check if file is hidden.
funcwcmatch.util.norm(m:Match[AnyStr]) -> AnyStr
Normalize the pattern.
funcwcmatch.util.norm_pattern(pattern:AnyStr, normalize:bool | None, is_raw_chars:bool) -> AnyStr
Normalize pattern.
funcwcmatch.util.platform() -> str
Get platform.
funcwcmatch.util.warn_deprecated(message:str, stacklevel:int=2) -> None
Warn deprecated.
classwcmatch.wcmatch.WcMatch
Finds files by wildcard.
methodwcmatch.wcmatch.WcMatch.compare_directory(directory:AnyStr) -> bool
Compare folder.
methodwcmatch.wcmatch.WcMatch.compare_file(filename:AnyStr) -> bool
Compare filename.
methodwcmatch.wcmatch.WcMatch.get_skipped() -> int
Get number of skipped files.
methodwcmatch.wcmatch.WcMatch.imatch() -> Iterator[Any]
Run the directory walker as iterator.
methodwcmatch.wcmatch.WcMatch.is_aborted() -> bool
Check if process has been aborted.
methodwcmatch.wcmatch.WcMatch.kill() -> None
Abort process.
methodwcmatch.wcmatch.WcMatch.match() -> list[Any]
Run the directory walker.
methodwcmatch.wcmatch.WcMatch.on_error(base:AnyStr, name:AnyStr) -> Any
On error.
methodwcmatch.wcmatch.WcMatch.on_init(**kwargs:Any) -> None
Handle custom initialization.
methodwcmatch.wcmatch.WcMatch.on_match(base:AnyStr, name:AnyStr) -> Any
On match.
methodwcmatch.wcmatch.WcMatch.on_reset() -> None
On reset.
methodwcmatch.wcmatch.WcMatch.on_skip(base:AnyStr, name:AnyStr) -> Any
On skip.
methodwcmatch.wcmatch.WcMatch.on_validate_directory(base:AnyStr, name:AnyStr) -> bool
Validate folder override.
methodwcmatch.wcmatch.WcMatch.on_validate_file(base:AnyStr, name:AnyStr) -> bool
Validate file override.
methodwcmatch.wcmatch.WcMatch.reset() -> None
Revive class from a killed state.

About this data

These signatures were extracted from the public source of facelessuser/wcmatch using Python's ast module. Argument names, default values, type annotations and return types are taken verbatim from the code. Implementation bodies are never stored. See how it works for details.

Back to all 805 libraries