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

Method from_comp_operator

mypy/fastparse.py:577–582  ·  view source on GitHub ↗
(self, op: ast3.cmpop)

Source from the content-addressed store, hash-verified

575 }
576
577 def from_comp_operator(self, op: ast3.cmpop) -> str:
578 op_name = ASTConverter.comp_op_map.get(type(op))
579 if op_name is None:
580 raise RuntimeError("Unknown comparison operator " + str(type(op)))
581 else:
582 return op_name
583
584 def set_block_lines(self, b: Block, stmts: Sequence[ast3.stmt]) -> None:
585 first, last = stmts[0], stmts[-1]

Callers 1

visit_CompareMethod · 0.95

Calls 4

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

Tested by

no test coverage detected