HEX
Server: LiteSpeed
System: Linux ws4.angoweb.net 5.14.0-611.13.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 11 04:57:59 EST 2025 x86_64
User: tswangoe (2287)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
Upload Files
File: //usr/lib/python3.9/site-packages/redis/commands/graph/__pycache__/node.cpython-39.opt-1.pyc
a

��b	�@sddlmZGdd�d�ZdS)�)�quote_stringc@s2eZdZdZddd�Zdd�Zdd�Zd	d
�ZdS)�Nodez"
    A node within the graph.
    NcCs�||_||_t|t�r$dd�|D�}|dusJ|dksJt|t�rXt|�dkrXd|_d|_nPt|t�rr||_|g|_n6t|t�r�tdd�|D��r�|d|_||_nt	d��|p�i|_
dS)z$
        Create a new node.
        cSsg|]}|dkr|�qS)����.0Zinner_labelrr�=/usr/lib/python3.9/site-packages/redis/commands/graph/node.py�
<listcomp>�z!Node.__init__.<locals>.<listcomp>Nr�cSsg|]}t|t��qSr)�
isinstance�strrrrrr	r
z8label should be either None, string or a list of strings)�id�aliasr�list�len�label�labelsr
�all�AssertionError�
properties)�selfZnode_idrrrrrr�__init__	s4
���
�

�
�z
Node.__init__cCs<d}|jr8d�dd�t|j���D��}|d|d7}|S)Nr�,css&|]\}}|dtt|��VqdS��:N�r
r�r�key�valrrr�	<genexpr>+s�z!Node.to_string.<locals>.<genexpr>�{�})r�join�sorted�items�r�resZpropsrrr�	to_string(s
�zNode.to_stringcCsnd}|jr||j7}|jr.|dd�|j�7}|jrbd�dd�t|j���D��}|d|d7}|d7}|S)	N�(rrcss&|]\}}|dtt|��VqdSrrrrrrr :s�zNode.__str__.<locals>.<genexpr>r!r"�))rrr#rr$r%r&rrr�__str__3s

�zNode.__str__cCs`|jdur$|jdur$|j|jkr$dS|j|jkr4dSt|j�t|j�krLdS|j|jkr\dSdS)NFT)rrrr)rZrhsrrr�__eq__Cs zNode.__eq__)NNNN)�__name__�
__module__�__qualname__�__doc__rr(r+r,rrrrrs

rN)Zhelpersrrrrrr�<module>s