| 2151 | |
| 2152 | |
| 2153 | class WithStmt(Statement): |
| 2154 | __slots__ = ("expr", "target", "unanalyzed_type", "analyzed_types", "body", "is_async") |
| 2155 | |
| 2156 | __match_args__ = ("expr", "target", "body") |
| 2157 | |
| 2158 | expr: list[Expression] |
| 2159 | target: list[Lvalue | None] |
| 2160 | # Type given by type comments for target, can be None |
| 2161 | unanalyzed_type: mypy.types.Type | None |
| 2162 | # Semantically analyzed types from type comment (TypeList type expanded) |
| 2163 | analyzed_types: list[mypy.types.Type] |
| 2164 | body: Block |
| 2165 | is_async: bool # True if `async with ...` (PEP 492, Python 3.5) |
| 2166 | |
| 2167 | def __init__( |
| 2168 | self, |
| 2169 | expr: list[Expression], |
| 2170 | target: list[Lvalue | None], |
| 2171 | body: Block, |
| 2172 | target_type: mypy.types.Type | None = None, |
| 2173 | ) -> None: |
| 2174 | super().__init__() |
| 2175 | self.expr = expr |
| 2176 | self.target = target |
| 2177 | self.unanalyzed_type = target_type |
| 2178 | self.analyzed_types = [] |
| 2179 | self.body = body |
| 2180 | self.is_async = False |
| 2181 | |
| 2182 | def accept(self, visitor: StatementVisitor[T]) -> T: |
| 2183 | return visitor.visit_with_stmt(self) |
| 2184 | |
| 2185 | |
| 2186 | class MatchStmt(Statement): |
no outgoing calls
no test coverage detected
searching dependent graphs…