Your IP : 18.220.43.27


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/rlcompleter.cpython-310.opt-2.pyc

o

6��f��@s�	ddlZddlZddlZddlZdgZGdd�d�Zdd�ZzddlZWney1dZ	YdSwe�
e�j�e�dd��d	Z	dS)
�N�	Completerc@s6eZdZddd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
rNcCs:	|rt|t�std��|durd|_dSd|_||_dS)Nznamespace must be a dictionary�r)�
isinstance�dict�	TypeError�use_main_ns�	namespace)�selfr�r
�2/opt/alt/python310/lib64/python3.10/rlcompleter.py�__init__(s

zCompleter.__init__cCs�	|jrtj|_|��s!|dkrtrt�d�t��dSdSdS|dkr6d|vr0|�	|�|_
n|�|�|_
z|j
|WStyFYdSw)Nr�	��.)
r�__main__�__dict__r�strip�_readline_available�readlineZinsert_textZ	redisplay�attr_matches�matches�global_matches�
IndexError)r	�text�stater
r
r�completeCs(
�zCompleter.completecCsJt|�r#|d7}zt�|�js|d7}W|SW|Sty"Y|Sw|S)N�(�))�callable�inspectZ	signatureZ
parameters�
ValueError)r	�val�wordr
r
r�_callable_postfixbs
���zCompleter._callable_postfixc	Cs�	ddl}g}dh}t|�}|jD]%}|d|�|kr6|�|�|dvr)|d}n|dvr1|d}|�|�q|jtjfD]%}|��D]\}}|d|�|kra||vra|�|�|�|�	||��qCq=|S)Nr�__builtins__>�finally�try�:>�False�else�break�None�pass�continue�True� )
�keyword�len�kwlist�add�appendr�builtinsr�itemsr#)	r	rr0r�seen�nr"Znspacer!r
r
rrms,



�
��zCompleter.global_matchescCsz	ddl}|�d|�}|sgS|�dd�\}}zt||j�}Wnty*gYSwtt|��}|�d�t	|d�rH|�
d�|�t|j
��g}t|�}	|dkrUd}
n	|dkr\d	}
nd}
	|D]F}|d|	�|kr�|
rw|d|	d�|
ks�d||f}ttt|�|d�t�r�|�|�qat||d�}
dur�|�|�|
|��qa|�|�qa|s�|
s�n
|
dkr�d	}
nd}
q_|��|S)Nrz(\w+(\.\w+)*)\.(\w*)r�r$�	__class__r�_�__Tz%s.%s)�re�match�group�evalr�	Exception�set�dir�discard�hasattrr3�update�get_class_membersr:r1r�getattr�type�propertyr4r#�sort)r	rr=�m�expr�attrZ
thisobjectZwordsrr8Znoprefixr"r>�valuer
r
rr�s^�


��

��zCompleter.attr_matches�N)�__name__�
__module__�__qualname__rrr#rrr
r
r
rr's
cCs.t|�}t|d�r|jD]}|t|�}q|S)N�	__bases__)rCrErTrG)�klassZret�baser
r
rrG�s


rGFcCs
t�d�SrP)r�
set_completerr
r
r
r�<lambda>�s
rXT)
�atexitr5rr�__all__rrGr�ImportErrorrrWr�registerr
r
r
r�<module>s"$
�

?>