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

Function extract_suffixes

src/_pytest/pathlib.py:163–171  ·  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[PurePath], prefix: str)

Source from the content-addressed store, hash-verified

161
162
163def extract_suffixes(iter: Iterable[PurePath], prefix: str) -> Iterator[str]:
164 """Return the parts of the paths following the prefix.
165
166 :param iter: Iterator over path names.
167 :param prefix: Expected prefix of the path names.
168 """
169 p_len = len(prefix)
170 for p in iter:
171 yield p.name[p_len:]
172
173
174def 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