Unary operation
| 2608 | |
| 2609 | |
| 2610 | class UnaryExpr(Expression): |
| 2611 | """Unary operation""" |
| 2612 | |
| 2613 | __slots__ = ("op", "expr", "method_type") |
| 2614 | |
| 2615 | __match_args__ = ("op", "expr") |
| 2616 | |
| 2617 | op: str # TODO: Enum? |
| 2618 | expr: Expression |
| 2619 | # Inferred operator method type |
| 2620 | method_type: mypy.types.Type | None |
| 2621 | |
| 2622 | def __init__(self, op: str, expr: Expression) -> None: |
| 2623 | super().__init__() |
| 2624 | self.op = op |
| 2625 | self.expr = expr |
| 2626 | self.method_type = None |
| 2627 | |
| 2628 | def accept(self, visitor: ExpressionVisitor[T]) -> T: |
| 2629 | return visitor.visit_unary_expr(self) |
| 2630 | |
| 2631 | |
| 2632 | class AssignmentExpr(Expression): |
no outgoing calls
no test coverage detected
searching dependent graphs…