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

Method add_prefixes

mypy/inspections.py:475–485  ·  view source on GitHub ↗
(self, result: str, expression: Expression)

Source from the content-addressed store, hash-verified

473 )
474
475 def add_prefixes(self, result: str, expression: Expression) -> str:
476 prefixes = []
477 if self.include_kind:
478 prefixes.append(f"{type(expression).__name__}")
479 if self.include_span:
480 prefixes.append(expr_span(expression))
481 if prefixes:
482 prefix = ":".join(prefixes) + " -> "
483 else:
484 prefix = ""
485 return prefix + result
486
487 def run_inspection_by_exact_location(
488 self,

Callers 3

expr_typeMethod · 0.95
expr_attrsMethod · 0.95
expression_defMethod · 0.95

Calls 4

typeClass · 0.85
expr_spanFunction · 0.85
appendMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected