MCPcopy Index your code
hub / github.com/pyinvoke/invoke / copy_dict

Function copy_dict

invoke/config.py:1239–1248  ·  view source on GitHub ↗

Return a fresh copy of ``source`` with as little shared state as possible. Uses `merge_dicts` under the hood, with an empty ``base`` dict; see its documentation for details on behavior. .. versionadded:: 1.0

(source: Dict[str, Any])

Source from the content-addressed store, hash-verified

1237
1238
1239def copy_dict(source: Dict[str, Any]) -> Dict[str, Any]:
1240 """
1241 Return a fresh copy of ``source`` with as little shared state as possible.
1242
1243 Uses `merge_dicts` under the hood, with an empty ``base`` dict; see its
1244 documentation for details on behavior.
1245
1246 .. versionadded:: 1.0
1247 """
1248 return merge_dicts({}, source)
1249
1250
1251def excise(dict_: Dict[str, Any], keypath: Tuple[str, ...]) -> None:

Callers 6

__init__Method · 0.85
_clone_init_kwargsMethod · 0.85
merge_dictsFunction · 0.85
from_moduleMethod · 0.85
configurationMethod · 0.85

Calls 1

merge_dictsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…