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

Method visit_Compare

mypy/fastparse.py:1601–1605  ·  view source on GitHub ↗
(self, n: ast3.Compare)

Source from the content-addressed store, hash-verified

1599
1600 # Compare(expr left, cmpop* ops, expr* comparators)
1601 def visit_Compare(self, n: ast3.Compare) -> ComparisonExpr:
1602 operators = [self.from_comp_operator(o) for o in n.ops]
1603 operands = self.translate_expr_list([n.left] + n.comparators)
1604 e = ComparisonExpr(operators, operands)
1605 return self.set_line(e, n)
1606
1607 # Call(expr func, expr* args, keyword* keywords)
1608 # keyword = (identifier? arg, expr value)

Callers

nothing calls this directly

Calls 4

from_comp_operatorMethod · 0.95
translate_expr_listMethod · 0.95
set_lineMethod · 0.95
ComparisonExprClass · 0.90

Tested by

no test coverage detected