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

Method visit_call_expr

mypy/checkexpr.py:492–501  ·  view source on GitHub ↗

Type check a call expression.

(self, e: CallExpr, allow_none_return: bool = False)

Source from the content-addressed store, hash-verified

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):

Callers 1

acceptMethod · 0.95

Calls 3

visit_call_expr_innerMethod · 0.95
acceptMethod · 0.95
isinstanceFunction · 0.85

Tested by

no test coverage detected