pg.typing.preset_args

Accessible via pg.typing.preset_args.

preset_args(kwargs, *, preset_name='global', inherit_preset=False)

Context manager to enable calling with user kwargs.

Return type:

Iterator[Dict[str, Any]]

Parameters:
  • kwargs – The preset kwargs to be used by preset-enabled functions within the context.

  • preset_name – The name of the preset to specify kwargs. enable_preset_args allows users to pass a preset name, which will be used to identify the present to be used.

  • inherit_preset – The name of the preset defined by the parent context to inherit kwargs from. Or a boolean to indicate whether to inherit a parent preset of the same name.

Yields:

Current preset kwargs.