MCPcopy Index your code
hub / github.com/python/cpython / strip_py_suffix

Function strip_py_suffix

Lib/test/libregrtest/utils.py:85–91  ·  view source on GitHub ↗
(names: list[str] | None)

Source from the content-addressed store, hash-verified

83
84
85def strip_py_suffix(names: list[str] | None) -> None:
86 if not names:
87 return
88 for idx, name in enumerate(names):
89 basename, ext = os.path.splitext(name)
90 if ext == '.py':
91 names[idx] = basename
92
93
94def plural(n: int, singular: str, plural: str | None = None) -> str:

Callers 2

find_testsMethod · 0.85
_initMethod · 0.85

Calls 2

enumerateFunction · 0.85
splitextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…