a
    a*j                     @  sP  U d dl mZ d dlmZ d dlmZmZ d dlmZm	Z	m
Z
mZmZmZmZmZmZmZmZ d dlmZmZmZ eeeef ZedZeddd	Zed
Zerd dlZd dlZ d dl!Z d dl"Z"G dd deZ#G dd deZ$G dd deZ%G dd deZ&G dd deZ'e&Z(e'Z)ed Z*dZ+de,d< dZ-de,d< dZ.de,d< g dZ/dS )    )annotations)Counter)	AwaitableIterable)TYPE_CHECKINGAnyCallableClassVarLiteral
NamedTupleOptionalTypeTypeVarUnioncast)	ParamSpecProtocol	TypeAliasRR_coT)	covariantPNc                   @  s&   e Zd ZU ded< ded< ded< dS )ItemPbytesvalueOptional[int]flagsZcasN)__name__
__module____qualname____annotations__ r!   r!   I/var/www/html/assistant/venv/lib/python3.9/site-packages/limits/typing.pyr   #   s   
r   c                   @  s   e Zd Zdddddddddddd	d
Zd&ddddddZdddddZd'ddddddZdddddddddZdddddddddZddddddddZ	dddddddddddd d!Z
ddddddd"d#d$Zd%S )(EmcacheClientPr   F)r   exptimenoreplyr   intboolNone)keyr   r   r$   r%   returnc                  s   d S Nr!   selfr)   r   r   r$   r%   r!   r!   r"   add*   s    zEmcacheClientP.addzOptional[ItemP])r)   return_flagsr*   c                   s   d S r+   r!   r-   r)   r/   r!   r!   r"   get4       zEmcacheClientP.getzIterable[bytes]zdict[bytes, ItemP]keysr*   c                   s   d S r+   r!   r-   r4   r!   r!   r"   get_many6   r2   zEmcacheClientP.get_manyc                   s   d S r+   r!   r0   r!   r!   r"   gets8   r2   zEmcacheClientP.gets)r%   r   r)   r   r%   r*   c                  s   d S r+   r!   r-   r)   r   r%   r!   r!   r"   	increment:   s    zEmcacheClientP.incrementc                  s   d S r+   r!   r9   r!   r!   r"   	decrement>   s    zEmcacheClientP.decrementr)   r%   r*   c                  s   d S r+   r!   r-   r)   r%   r!   r!   r"   deleteB   r2   zEmcacheClientP.deletec                  s   d S r+   r!   r,   r!   r!   r"   setD   s    zEmcacheClientP.set)r)   r$   r%   r*   c                  s   d S r+   r!   )r-   r)   r$   r%   r!   r!   r"   touchN   s    zEmcacheClientP.touchN)F)F)r   r   r   r.   r1   r6   r7   r:   r;   r>   r?   r@   r!   r!   r!   r"   r#   )   s$   
r#   c                   @  s   e Zd Zd$dddddddd	d
Zd%ddddddZdddddZd&dddddddZd'dddddddZd(ddddddZd)ddddddddd Z	d*ddddd!d"d#Z
dS )+MemcachedClientPr   NstrSerializabler   zOptional[bool]r'   )r)   r   expirer%   r   r*   c                 C  s   d S r+   r!   r-   r)   r   rD   r%   r   r!   r!   r"   r.   T   s    zMemcachedClientP.addzOptional[str]r   )r)   defaultr*   c                 C  s   d S r+   r!   )r-   r)   rF   r!   r!   r"   r1   ]   r2   zMemcachedClientP.getzIterable[str]zdict[str, Any]r3   c                 C  s   d S r+   r!   r5   r!   r!   r"   r6   _   r2   zMemcachedClientP.get_manyFr&   r8   c                 C  s   d S r+   r!   r9   r!   r!   r"   incra   s    zMemcachedClientP.incrc                 C  s   d S r+   r!   r9   r!   r!   r"   decre   s    zMemcachedClientP.decrr<   c                 C  s   d S r+   r!   r=   r!   r!   r"   r>   l   r2   zMemcachedClientP.deletec                 C  s   d S r+   r!   rE   r!   r!   r"   r?   n   s    zMemcachedClientP.set)r)   rD   r%   r*   c                 C  s   d S r+   r!   )r-   r)   rD   r%   r!   r!   r"   r@   w   s    zMemcachedClientP.touch)r   NN)N)F)F)N)r   NN)r   N)r   r   r   r.   r1   r6   rG   rH   r>   r?   r@   r!   r!   r!   r"   rA   S   s"      	     
 rA   c                   @  s~   e Zd ZddddddZddddd	Zdddd
dZdddddZddddddZddddZdddddZ	dS )RedisClientPrB   r&   r)   amountr*   c                 C  s   d S r+   r!   r-   r)   rK   r!   r!   r"   incrby}   r2   zRedisClientP.incrbyOptional[bytes]r)   r*   c                 C  s   d S r+   r!   r-   r)   r!   r!   r"   r1   ~   r2   zRedisClientP.getc                 C  s   d S r+   r!   rP   r!   r!   r"   r>      r2   zRedisClientP.deletec                 C  s   d S r+   r!   rP   r!   r!   r"   ttl   r2   zRedisClientP.ttlr'   r)   secondsr*   c                 C  s   d S r+   r!   r-   r)   rS   r!   r!   r"   rD      r2   zRedisClientP.expirer*   c                 C  s   d S r+   r!   r-   r!   r!   r"   ping   r2   zRedisClientP.pingr   'redis.commands.core.Script'scriptr*   c                 C  s   d S r+   r!   r-   rZ   r!   r!   r"   register_script   r2   zRedisClientP.register_scriptN
r   r   r   rM   r1   r>   rQ   rD   rW   r\   r!   r!   r!   r"   rI   |   s   rI   c                   @  s~   e Zd ZddddddZddddd	Zdddd
dZdddddZddddddZddddZdddddZ	dS )AsyncRedisClientPrB   r&   rJ   c                   s   d S r+   r!   rL   r!   r!   r"   rM      r2   zAsyncRedisClientP.incrbyrN   rO   c                   s   d S r+   r!   rP   r!   r!   r"   r1      r2   zAsyncRedisClientP.getc                   s   d S r+   r!   rP   r!   r!   r"   r>      r2   zAsyncRedisClientP.deletec                   s   d S r+   r!   rP   r!   r!   r"   rQ      r2   zAsyncRedisClientP.ttlr'   rR   c                   s   d S r+   r!   rT   r!   r!   r"   rD      r2   zAsyncRedisClientP.expirerU   c                   s   d S r+   r!   rV   r!   r!   r"   rW      r2   zAsyncRedisClientP.pingr   rX   rY   c                 C  s   d S r+   r!   r[   r!   r!   r"   r\      r2   z!AsyncRedisClientP.register_scriptNr]   r!   r!   r!   r"   r^      s   r^   )zcoredis.Redis[bytes]zcoredis.RedisCluster[bytes]z#pymongo.MongoClient[dict[str, Any]]r   MongoClientz)pymongo.database.Database[dict[str, Any]]MongoDatabasez-pymongo.collection.Collection[dict[str, Any]]MongoCollection)r   AsyncRedisClientr   r   r	   r   r#   r   r
   rA   r_   ra   r`   r   r   r   r   r   rC   r   r   r   RedisClientr   r   r   r   r   )0
__future__r   collectionsr   collections.abcr   r   typingr   r   r   r	   r
   r   r   r   r   r   r   Ztyping_extensionsr   r   r   r&   rB   floatrC   r   r   r   ZcoredisZpymongo.collectionZpymongoZpymongo.databaseZredisr   r#   rA   rI   r^   rc   rb   ZAsyncCoRedisClientr_   r    r`   ra   __all__r!   r!   r!   r"   <module>   s2   4*)

