MCPcopy Create free account
hub / github.com/python/mypy / copy_function_attributes

Method copy_function_attributes

mypy/treetransform.py:233–242  ·  view source on GitHub ↗
(self, new: FuncItem, original: FuncItem)

Source from the content-addressed store, hash-verified

231 return new
232
233 def copy_function_attributes(self, new: FuncItem, original: FuncItem) -> None:
234 new.info = original.info
235 new.min_args = original.min_args
236 new.max_pos = original.max_pos
237 new.is_overload = original.is_overload
238 new.is_generator = original.is_generator
239 new.is_coroutine = original.is_coroutine
240 new.is_async_generator = original.is_async_generator
241 new.is_awaitable_coroutine = original.is_awaitable_coroutine
242 new.line = original.line
243
244 def visit_overloaded_func_def(self, node: OverloadedFuncDef) -> OverloadedFuncDef:
245 items = [cast(OverloadPart, item.accept(self)) for item in node.items]

Callers 2

visit_func_defMethod · 0.95
visit_lambda_exprMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected