Type check a call expression.
(self, e: CallExpr, allow_none_return: bool = False)
| 490 | return result |
| 491 | |
| 492 | def visit_call_expr(self, e: CallExpr, allow_none_return: bool = False) -> Type: |
| 493 | """Type check a call expression.""" |
| 494 | if e.analyzed: |
| 495 | if isinstance(e.analyzed, NamedTupleExpr) and not e.analyzed.is_typed: |
| 496 | # Type check the arguments, but ignore the results. This relies |
| 497 | # on the typeshed stubs to type check the arguments. |
| 498 | self.visit_call_expr_inner(e) |
| 499 | # It's really a special form that only looks like a call. |
| 500 | return self.accept(e.analyzed, self.type_context[-1]) |
| 501 | return self.visit_call_expr_inner(e, allow_none_return=allow_none_return) |
| 502 | |
| 503 | def refers_to_typeddict(self, base: Expression) -> bool: |
| 504 | if not isinstance(base, RefExpr): |
no test coverage detected