MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / partial

Function partial

src/commoncode/functional.py:100–105  ·  view source on GitHub ↗

Return a partial function. Same as functools.partial but keeping the __doc__ and __name__ of the warpper function.

(func, *args, **kwargs)

Source from the content-addressed store, hash-verified

98
99
100def partial(func, *args, **kwargs):
101 """
102 Return a partial function. Same as functools.partial but keeping the __doc__
103 and __name__ of the warpper function.
104 """
105 return functools.update_wrapper(functools.partial(func, *args, **kwargs), func)

Callers 15

test_partialMethod · 0.90
alpine.pyFile · 0.85
cocoapods.pyFile · 0.85
build_package_dataFunction · 0.85
spec.pyFile · 0.85
_parseMethod · 0.85
compute_candidatesFunction · 0.85
get_scannerMethod · 0.85
format_textFunction · 0.85
_add_rulesMethod · 0.85
match_queryMethod · 0.85
tokens_stringMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_partialMethod · 0.72