MCPcopy Index your code
hub / github.com/python/cpython / __call__

Method __call__

Lib/annotationlib.py:474–488  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

472 return self.__make_new(ast.Attribute(self.__get_ast(), attr))
473
474 def __call__(self, *args, **kwargs):
475 extra_names = {}
476 ast_args = []
477 for arg in args:
478 new_arg, new_extra_names = self.__convert_to_ast(arg)
479 if new_extra_names is not None:
480 extra_names.update(new_extra_names)
481 ast_args.append(new_arg)
482 ast_kwargs = []
483 for key, value in kwargs.items():
484 new_value, new_extra_names = self.__convert_to_ast(value)
485 if new_extra_names is not None:
486 extra_names.update(new_extra_names)
487 ast_kwargs.append(ast.keyword(key, new_value))
488 return self.__make_new(ast.Call(self.__get_ast(), ast_args, ast_kwargs), extra_names)
489
490 def __iter__(self):
491 yield self.__make_new(ast.Starred(self.__get_ast()))

Callers

nothing calls this directly

Calls 6

__convert_to_astMethod · 0.95
__make_newMethod · 0.95
__get_astMethod · 0.95
updateMethod · 0.45
appendMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected