qis.update_kwargs

qis.update_kwargs(kwargs, new_kwargs)[source]

merge two keyword dictionaries, with the second winning on collisions.

Neither argument is mutated: the copy is the point. This is how the factsheet layer passes one defaults dict down to every panel while letting each panel override a few entries, without a panel’s override leaking into its siblings.

Parameters:
  • kwargs (Dict[Any, Any]) – base keyword dictionary

  • new_kwargs (Dict[Any, Any] | None) – overrides. None or empty leaves the base unchanged

Returns:

a new dictionary; neither input is modified

Return type:

Dict[Any, Any]