📄 _helpers_py.cpython-310.pyc

Size: 2,426 bytes
Path: //opt/saltstack/salt/lib/python3.10/site-packages/propcache/__pycache__/_helpers_py.cpython-310.pyc
Modified: 2026-06-18 13:40:20
o

�j}�@s�dZddlZddlmZddlmZddlmZmZm	Z	m
Z
mZmZm
Z
mZdZejdkr4ddlmZneZed	�Zed
eeefd�ZGdd
�d
ee�ZGdd�de	e�ZdS)zVarious helper functions.�N)�Mapping)�cached_property)�Any�Callable�Generic�Optional�Protocol�TypeVar�Union�overload)�under_cached_propertyr)��)�Self�_T�_Cache)�boundc@seZdZUeed<dS)�
_CacheImpl�_cacheN)�__name__�
__module__�__qualname__r�__annotations__�rr�I/opt/saltstack/salt/lib/python3.10/site-packages/propcache/_helpers_py.pyrs
rc	@s�eZdZdZdeegefddfdd�Zedddde	e
edefd	d
��Z
eddeede	e
edefdd
��Z
	dde	eede	e
edeeeffdd
�Z
deed
eddfdd�ZdS)raUUse as a class method decorator.

    It operates almost exactly like
    the Python `@property` decorator, but it puts the result of the
    method it decorates into the instance dict after the first call,
    effectively replacing the function it decorates with an instance
    variable.  It is, in Python parlance, a data descriptor.
    �wrapped�returnNcCs||_|j|_|j|_dS�N)r�__doc__r�name)�selfrrrr�__init__$szunder_cached_property.__init__�inst�ownercC�dSrr�r r"r#rrr�__get__)�zunder_cached_property.__get__cCr$rrr%rrrr&,r'cCsH|dur|Sz|j|jWSty#|�|�}||j|j<|YSwr)rr�KeyErrorr)r r"r#�valrrrr&/s
��valuecCstd��)Nzcached property is read-only)�AttributeError)r r"r*rrr�__set__;szunder_cached_property.__set__r)rrrrrrrr!rr�type�objectrr&rr
r,rrrrrs 	"&�
�
�

�r)r�sys�collections.abcr�	functoolsr�typingrrrrrr	r
r�__all__�version_inforr�strrrrrrrr�<module>s(