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

Method simplify_path

mypy/errors.py:543–548  ·  view source on GitHub ↗
(self, file: str)

Source from the content-addressed store, hash-verified

541 self.ignore_prefix = prefix
542
543 def simplify_path(self, file: str) -> str:
544 if self.options.show_absolute_path:
545 return os.path.abspath(file)
546 else:
547 file = os.path.normpath(file)
548 return remove_path_prefix(file, self.ignore_prefix)
549
550 def set_file(
551 self, file: str, module: str | None, options: Options, scope: Scope | None = None

Callers 4

render_messagesMethod · 0.95
find_stale_sccsFunction · 0.80
process_graphFunction · 0.80
process_stale_sccFunction · 0.80

Calls 1

remove_path_prefixFunction · 0.85

Tested by

no test coverage detected