MCPcopy
hub / github.com/python/mypy / is_pyc_only

Function is_pyc_only

mypy/moduleinspect.py:42–43  ·  view source on GitHub ↗
(file: str | None)

Source from the content-addressed store, hash-verified

40
41
42def is_pyc_only(file: str | None) -> bool:
43 return bool(file and file.endswith(".pyc") and not os.path.exists(file[:-1]))
44
45
46class InspectError(Exception):

Callers 1

split_pyc_from_pyFunction · 0.90

Calls 3

boolClass · 0.85
existsMethod · 0.80
endswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…