MCPcopy
hub / github.com/dask/dask / __init__

Method __init__

dask/config.py:412–434  ·  view source on GitHub ↗
(
        self,
        arg: Mapping | None = None,
        config: dict | None = None,
        lock: threading.Lock = config_lock,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

410 _record: list[tuple[Literal["insert", "replace"], tuple[str, ...], Any]]
411
412 def __init__(
413 self,
414 arg: Mapping | None = None,
415 config: dict | None = None,
416 lock: threading.Lock = config_lock,
417 **kwargs,
418 ):
419 if config is None: # Keep Sphinx autofunction documentation clean
420 config = global_config
421
422 with lock:
423 self.config = config
424 self._record = []
425
426 if arg is not None:
427 for key, value in arg.items():
428 key = check_deprecations(key)
429 self._assign(key.split("."), value, config)
430 if kwargs:
431 for key, value in kwargs.items():
432 key = key.replace("__", ".")
433 key = check_deprecations(key)
434 self._assign(key.split("."), value, config)
435
436 def __enter__(self):
437 return self.config

Callers

nothing calls this directly

Calls 5

_assignMethod · 0.95
check_deprecationsFunction · 0.85
splitMethod · 0.80
itemsMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected