MCPcopy Create free account
hub / github.com/pytest-dev/pytest / find_prefixed

Function find_prefixed

src/_pytest/pathlib.py:155–160  ·  view source on GitHub ↗

Find all elements in root that begin with the prefix, case insensitive.

(root: Path, prefix: str)

Source from the content-addressed store, hash-verified

153
154
155def find_prefixed(root: Path, prefix: str) -> Iterator[Path]:
156 """Find all elements in root that begin with the prefix, case insensitive."""
157 l_prefix = prefix.lower()
158 for x in root.iterdir():
159 if x.name.lower().startswith(l_prefix):
160 yield x
161
162
163def extract_suffixes(iter: Iterable[PurePath], prefix: str) -> Iterator[str]:

Callers 2

find_suffixesFunction · 0.85
cleanup_candidatesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected