(
self,
arg: Mapping | None = None,
config: dict | None = None,
lock: threading.Lock = config_lock,
**kwargs,
)
| 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 |
nothing calls this directly
no test coverage detected