ó
    Eñi  ã                  ó˜   • S SK Jr  S SKJr  S SKJr  S SKJr  S SKJr  SS/r\" S5      r\" S	5      r	 " S
 S\\   5      r
 " S S5      rg)é    )Úannotations)ÚAny)Úcast)ÚGeneric)ÚTypeVarÚStashÚStashKeyÚTÚDc                  ó   • \ rS rSrSrSrSrg)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.

.. versionadded:: 7.0
© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__Ú__static_attributes__r   ó    ÚJ/home/mande/repo/quber/.venv/lib/python3.13/site-packages/_pytest/stash.pyr	   r	      s   † ñð ƒIr   c                  ól   • \ rS rSrSrSrSS jrSS jrSS jrSS jr	SS jr
SS	 jrSS
 jrSS jrSrg)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]

.. versionadded:: 7.0
©Ú_storagec                ó   • 0 U l         g )Nr   ©Úselfs    r   Ú__init__ÚStash.__init__H   s	   € Ø57ˆ�r   c                ó    • X R                   U'   g)zSet a value for key.Nr   )r   ÚkeyÚvalues      r   Ú__setitem__ÚStash.__setitem__K   s   € à"�‰�cÒr   c                ó<   • [        [        U R                  U   5      $ )zJGet the value for key.

Raises ``KeyError`` if the key wasn't set before.
)r   r
   r   ©r   r"   s     r   Ú__getitem__ÚStash.__getitem__O   s   € ô
 ”A�t—}‘} SÑ)Ó*Ð*r   c                ó0   •  X   $ ! [          a    Us $ f = f)zFGet the value for key, or return default if the key wasn't set
before.©ÚKeyError©r   r"   Údefaults      r   ÚgetÚ	Stash.getV   s#   € ð	Ø‘9ÐøÜó 	ØŠNð	ús   ‚ †”c                ó8   •  X   $ ! [          a	    X U'   Us $ f = f)zeReturn the value of key if already set, otherwise set the value
of key to default and return default.r+   r-   s      r   Ú
setdefaultÚStash.setdefault^   s*   € ð	Ø‘9ÐøÜó 	Ø�‰IØŠNð	ús   ‚ †˜c                ó   • U R                   U	 g)zMDelete the value for key.

Raises ``KeyError`` if the key wasn't set before.
Nr   r'   s     r   Ú__delitem__ÚStash.__delitem__g   s   € ð
 �M‰M˜#Ñr   c                ó   • XR                   ;   $ )zReturn whether key was set.r   r'   s     r   Ú__contains__ÚStash.__contains__n   s   € à—m‘mÑ#Ð#r   c                ó,   • [        U R                  5      $ )z)Return how many items exist in the stash.)Úlenr   r   s    r   Ú__len__ÚStash.__len__r   s   € ä�4—=‘=Ó!Ð!r   N)ÚreturnÚNone)r"   úStashKey[T]r#   r
   r>   r?   )r"   r@   r>   r
   )r"   r@   r.   r   r>   zT | D)r"   r@   r.   r
   r>   r
   )r"   r@   r>   r?   )r"   r@   r>   Úbool)r>   Úint)r   r   r   r   r   r   r   r$   r(   r/   r2   r5   r8   r<   r   r   r   r   r   r      s7   † ñ&ðP €Iô8ô#ô+ôôôô$÷"r   N)Ú
__future__r   Útypingr   r   r   r   Ú__all__r
   r   r	   r   r   r   r   Ú<module>rF      sP   ðÝ "å Ý Ý Ý ð �JÐ
€ñ ˆCƒL€ÙˆCƒL€ô
ˆw�q‰zô 
÷W"ò W"r   