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

Function get_prefix

mypy/config_parser.py:387–393  ·  view source on GitHub ↗
(file_read: str, name: str)

Source from the content-addressed store, hash-verified

385
386
387def get_prefix(file_read: str, name: str) -> str:
388 if is_toml(file_read):
389 module_name_str = 'module = "%s"' % "-".join(name.split("-")[1:])
390 else:
391 module_name_str = name
392
393 return f"{file_read}: [{module_name_str}]:"
394
395
396def is_toml(filename: str) -> bool:

Callers 1

parse_config_fileFunction · 0.70

Calls 3

is_tomlFunction · 0.85
splitMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…