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

Class CallExpr

mypy/nodes.py:2510–2543  ·  view source on GitHub ↗

Call expression. This can also represent several special forms that are syntactically calls such as cast(...) and None # type: ....

Source from the content-addressed store, hash-verified

2508
2509
2510class CallExpr(Expression):
2511 """Call expression.
2512
2513 This can also represent several special forms that are syntactically calls
2514 such as cast(...) and None # type: ....
2515 """
2516
2517 __slots__ = ("callee", "args", "arg_kinds", "arg_names", "analyzed")
2518
2519 __match_args__ = ("callee", "args", "arg_kinds", "arg_names")
2520
2521 def __init__(
2522 self,
2523 callee: Expression,
2524 args: list[Expression],
2525 arg_kinds: list[ArgKind],
2526 arg_names: list[str | None],
2527 analyzed: Expression | None = None,
2528 ) -> None:
2529 super().__init__()
2530 if not arg_names:
2531 arg_names = [None] * len(args)
2532
2533 self.callee = callee
2534 self.args = args
2535 self.arg_kinds = arg_kinds # ARG_ constants
2536 # Each name can be None if not a keyword argument.
2537 self.arg_names: list[str | None] = arg_names
2538 # If not None, the node that represents the meaning of the CallExpr. For
2539 # cast(...) this is a CastExpr.
2540 self.analyzed = analyzed
2541
2542 def accept(self, visitor: ExpressionVisitor[T]) -> T:
2543 return visitor.visit_call_expr(self)
2544
2545
2546class YieldFromExpr(Expression):

Callers 11

check_init_subclassMethod · 0.90
visit_del_stmtMethod · 0.90
visit_CallMethod · 0.90
visit_JoinedStrMethod · 0.90
visit_FormattedValueMethod · 0.90
visit_call_exprMethod · 0.90
read_expressionFunction · 0.90
build_fstring_joinFunction · 0.90
read_fstring_itemFunction · 0.90
make_callFunction · 0.90

Calls

no outgoing calls

Tested by 1

make_callFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…