MCPcopy Index your code
hub / github.com/python/mypy / _file_arg_to_module

Function _file_arg_to_module

mypy/test/data.py:48–53  ·  view source on GitHub ↗
(filename: str)

Source from the content-addressed store, hash-verified

46
47
48def _file_arg_to_module(filename: str) -> str:
49 filename, _ = os.path.splitext(filename)
50 parts = filename.split("/") # not os.sep since it comes from test data
51 if parts[-1] == "__init__":
52 parts.pop()
53 return ".".join(parts)
54
55
56def parse_test_case(case: DataDrivenTestCase) -> None:

Callers 1

parse_test_caseFunction · 0.85

Calls 3

splitMethod · 0.80
popMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…