
    +h                     >    d dl mZ erd dlmZmZ d Z G d d      Zy)    )TYPE_CHECKING)PipelineRedisc                 4    ddl m}  |j                  | fi |S )z
    Returns an active Redis client generated from the given database URL.

    Will attempt to extract the database id from the path url fragment, if
    none is provided.
    r   )r   )redis.asyncio.clientr   from_url)urlkwargsr   s      F/var/www/html/venv/lib/python3.12/site-packages/redis/asyncio/utils.pyr   r      s     +5>>#(((    c                   "    e Zd ZddZddZd Zy)pipelinec                 .    |j                         | _        y N)r   p)self	redis_objs     r   __init__zpipeline.__init__   s    &//1r   c                 "   K   | j                   S wr   )r   )r   s    r   
__aenter__zpipeline.__aenter__   s     vvs   c                 X   K   | j                   j                          d {    | ` y 7 wr   )r   execute)r   exc_type	exc_value	tracebacks       r   	__aexit__zpipeline.__aexit__   s$     ffnnF 	s   *(*N)r   r   )returnr   )__name__
__module____qualname__r   r   r    r   r   r   r      s    2r   r   N)typingr   r   r   r   r   r   r!   r   r   <module>r#      s     4	)	 	r   