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

Method from_operator

mypy/fastparse.py:557–562  ·  view source on GitHub ↗
(self, op: ast3.operator)

Source from the content-addressed store, hash-verified

555 }
556
557 def from_operator(self, op: ast3.operator) -> str:
558 op_name = ASTConverter.op_map.get(type(op))
559 if op_name is None:
560 raise RuntimeError("Unknown operator " + str(type(op)))
561 else:
562 return op_name
563
564 comp_op_map: Final[dict[type[AST], str]] = {
565 ast3.Gt: ">",

Callers 2

visit_AugAssignMethod · 0.95
visit_BinOpMethod · 0.95

Calls 4

typeClass · 0.85
RuntimeErrorClass · 0.85
strClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected