§ |<ˆjï ã óÄ — d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ ddgZ ed ¦ « Z ed ¦ « Z G d„ dee ¦ « Z G d„ d¦ « Zd S )é )ÚAny)Úcast)ÚDict)ÚGeneric)ÚTypeVar)ÚUnionÚStashÚStashKeyÚTÚDc ó — e Zd ZdZdZdS )r zÔ``StashKey`` is an object used as a key to a :class:`Stash`. A ``StashKey`` is associated with the type ``T`` of the value of the key. A ``StashKey`` is unique and cannot conflict with another key. © N)Ú__name__Ú __module__Ú__qualname__Ú__doc__Ú __slots__r ó ú_/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/_pytest/stash.pyr r s € € € € € ðð ð €I€I€Ir c óî — e Zd ZdZdZdd„Zdee deddfd„Zdee defd „Z dee d e deee f fd„Zdee d edefd„Z dee ddfd „Zdee defd„Zdefd„ZdS )r a/ ``Stash`` is a type-safe heterogeneous mutable mapping that allows keys and value types to be defined separately from where it (the ``Stash``) is created. Usually you will be given an object which has a ``Stash``, for example :class:`~pytest.Config` or a :class:`~_pytest.nodes.Node`: .. code-block:: python stash: Stash = some_object.stash If a module or plugin wants to store data in this ``Stash``, it creates :class:`StashKey`\s for its keys (at the module level): .. code-block:: python # At the top-level of the module some_str_key = StashKey[str]() some_bool_key = StashKey[bool]() To store information: .. code-block:: python # Value type must match the key. stash[some_str_key] = "value" stash[some_bool_key] = True To retrieve the information: .. code-block:: python # The static type of some_str is str. some_str = stash[some_str_key] # The static type of some_bool is bool. some_bool = stash[some_bool_key] ©Ú_storageÚreturnNc ó — i | _ d S )Nr ©Úselfs r Ú__init__zStash.__init__D s € Ø57ˆŒ ˆ ˆ r ÚkeyÚvaluec ó — || j |<