
    ng\j	                         S SK r S SKJr  S SKJr  S SKJrJrJr  SSK	J
r
JrJr  SSKJrJrJrJrJrJr   " S	 S
\5      r " S S\5      r " S S\5      rg)    N)Literalpairs_to_dict)parse_vemb_resultparse_vlinks_resultparse_vsim_result   )apply_module_callbacksget_legacy_responsesget_protocol_version   )VEMB_CMDVGETATTR_CMD	VINFO_CMD
VLINKS_CMDVSIM_CMDVectorSetCommandsc                       \ rS rSrSrS rSrg)_VectorSetBase   zBBase class with shared initialization logic for VectorSet clients.c                 v   [         [        [        [        [        S 0n[
        S [        [        0U l        0 U l	        [        U R                  5      U l        [        U R                  5      U l        0 U l        Xl        UR                  U l        [!        [#        U R                  5      [%        U R                  5      UU R                  U R                  U R                  U R                  U R                  S9U l        U R&                  R)                  5        H   u  pEU R                  R+                  XE5        M"     g)z+Initialize VectorSet client with callbacks.c                 R    U =(       a    [         R                  " U 5      =(       d    S $ N)jsonloadsrs    \/home/edenadmin/noVNC/venv/lib/python3.13/site-packages/redis/commands/vectorset/__init__.py<lambda>)_VectorSetBase.__init__.<locals>.<lambda>#   s    A$7$**Q-$?4$?    c                 <    U =(       a    [        U 5      =(       d    S $ r   r   r   s    r   r   r    '   s    !7}Q'7!?4!?r!   )commonresp2resp3resp2_unifiedresp3_unifiedresp3_to_resp2_legacyN)r   r   r   r   r   r   r   r   _RESP2_MODULE_CALLBACKS_RESP3_MODULE_CALLBACKSdict_RESP2_UNIFIED_MODULE_CALLBACKS_RESP3_UNIFIED_MODULE_CALLBACKS'_RESP3_TO_RESP2_LEGACY_MODULE_CALLBACKSclientexecute_commandr
   r   r   _MODULE_CALLBACKSitemsset_response_callback)selfr/   kwargsr1   kvs         r   __init___VectorSetBase.__init__   s    ''?
 ?+(
$ (*$/3D4P4P/Q,/3D4P4P/Q,794%55!7 - -$....>>>>"&"N"N	"
 **002DAKK--a3 3r!   )r1   r)   r,   r*   r.   r-   r/   r0   N)__name__
__module____qualname____firstlineno____doc__r8   __static_attributes__ r!   r   r   r      s
    L!4r!   r   c                   .    \ rS rSr% SrSr\S   \S'   Srg)	VectorSetA   zSync VectorSet client.F_is_async_clientr@   N	r:   r;   r<   r=   r>   rD   r   __annotations__r?   r@   r!   r   rB   rB   A   s     ',gen,r!   rB   c                   .    \ rS rSr% SrSr\S   \S'   Srg)AsyncVectorSetG   a&  Async VectorSet client.

Note: Inherits from _VectorSetBase (not VectorSet) to maintain proper
type discrimination. If AsyncVectorSet inherited from VectorSet, the
type system would see it as a subtype of SyncClientProtocol, causing
@overload resolution to incorrectly infer sync return types.
TrD   r@   NrE   r@   r!   r   rH   rH   G   s     '+gdm*r!   rH   )r   typingr   redis._parsers.helpersr   redis.commands.vectorset.utilsr   r   r   helpersr
   r   r   commandsr   r   r   r   r   r   r   rB   rH   r@   r!   r   <module>rO      sR      0  
 $4& $4N- -	+^ 	+r!   