MCPcopy
hub / github.com/pytest-dev/pytest / extract_suffixes

Function extract_suffixes

src/_pytest/pathlib.py:180–188  ·  view source on GitHub ↗

Return the parts of the paths following the prefix. :param iter: Iterator over path names. :param prefix: Expected prefix of the path names.

(iter: Iterable[os.DirEntry[str]], prefix: str)

Source from the content-addressed store, hash-verified

178
179
180def extract_suffixes(iter: Iterable[os.DirEntry[str]], prefix: str) -> Iterator[str]:
181 """Return the parts of the paths following the prefix.
182
183 :param iter: Iterator over path names.
184 :param prefix: Expected prefix of the path names.
185 """
186 p_len = len(prefix)
187 for entry in iter:
188 yield entry.name[p_len:]
189
190
191def find_suffixes(root: Path, prefix: str) -> Iterator[str]:

Callers 2

find_suffixesFunction · 0.85
cleanup_candidatesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected