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

Function prettify_filename

Tools/cases_generator/parser.py:27–35  ·  view source on GitHub ↗
(filename: str)

Source from the content-addressed store, hash-verified

25CodeDef = InstDef | LabelDef
26
27def prettify_filename(filename: str) -> str:
28 # Make filename more user-friendly and less platform-specific,
29 # it is only used for error reporting at this point.
30 filename = filename.replace("\\", "/")
31 if filename.startswith("./"):
32 filename = filename[2:]
33 if filename.endswith(".new"):
34 filename = filename[:-4]
35 return filename
36
37
38BEGIN_MARKER = "// BEGIN BYTECODES //"

Callers 1

parse_filesFunction · 0.85

Calls 3

replaceMethod · 0.45
startswithMethod · 0.45
endswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…