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

Method visit_BinOp

mypy/fastparse.py:1498–1505  ·  view source on GitHub ↗
(self, n: ast3.BinOp)

Source from the content-addressed store, hash-verified

1496
1497 # BinOp(expr left, operator op, expr right)
1498 def visit_BinOp(self, n: ast3.BinOp) -> OpExpr:
1499 op = self.from_operator(n.op)
1500
1501 if op is None:
1502 raise RuntimeError("cannot translate BinOp " + str(type(n.op)))
1503
1504 e = OpExpr(op, self.visit(n.left), self.visit(n.right))
1505 return self.set_line(e, n)
1506
1507 # UnaryOp(unaryop op, expr operand)
1508 def visit_UnaryOp(self, n: ast3.UnaryOp) -> UnaryExpr:

Callers

nothing calls this directly

Calls 7

from_operatorMethod · 0.95
visitMethod · 0.95
set_lineMethod · 0.95
OpExprClass · 0.90
RuntimeErrorClass · 0.85
strClass · 0.85
typeClass · 0.85

Tested by

no test coverage detected