MCPcopy Create free account
hub / github.com/dask/dask / rename

Function rename

dask/config.py:725–744  ·  view source on GitHub ↗

Rename old keys to new keys This helps migrate older configuration versions over time See Also -------- check_deprecations

(
    deprecations: Mapping[str, str | None] = deprecations, config: dict = config
)

Source from the content-addressed store, hash-verified

723
724
725def rename(
726 deprecations: Mapping[str, str | None] = deprecations, config: dict = config
727) -> None:
728 """Rename old keys to new keys
729
730 This helps migrate older configuration versions over time
731
732 See Also
733 --------
734 check_deprecations
735 """
736 for key in deprecations:
737 try:
738 value = pop(key, config=config)
739 except (TypeError, IndexError, KeyError):
740 continue
741 key = canonical_name(key, config=config)
742 new = check_deprecations(key, deprecations)
743 if new:
744 set({new: value}, config=config)
745
746
747def check_deprecations(

Callers 2

test_renameFunction · 0.90
refreshFunction · 0.85

Calls 4

popFunction · 0.85
canonical_nameFunction · 0.85
check_deprecationsFunction · 0.85
setClass · 0.85

Tested by 1

test_renameFunction · 0.72