HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/idlelib/__pycache__/calltip.cpython-310.opt-2.pyc
o

�ic�@s�	ddlZddlZddlZddlZddlZddlZddlmZddlm	Z	Gdd�d�Z
dd�ZdZd	Z
d
Ze�d�ZdZd
Zdd�ZedkrUddlmZeddd�dSdS)�N)�	calltip_w)�HyperParserc@sXeZdZddd�Zdd�Zdd�Zddd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�ZdS)�CalltipNcCs2|dur	d|_dS||_|j|_d|_|j|_dS�N)�editwin�text�active_calltip�_make_tk_calltip_window�_calltip_window)�selfr�r�,/usr/local/lib/python3.10/idlelib/calltip.py�__init__s
zCalltip.__init__cCs
d|_dSr)r
�rrrr
�closes
z
Calltip.closecCst�|j�Sr)rZ
CalltipWindowrrrrr
r	 szCalltip._make_tk_calltip_windowcCs|jr
|j��d|_dSdSr)rZhidetip�r�eventrrr
�remove_calltip_window$s

�zCalltip.remove_calltip_windowcCs	|�d�dS)NT�break��open_calltiprrrr
�force_open_calltip_event)s
z Calltip.force_open_calltip_eventcCs	|�d�dS�NFrrrrr
�try_open_calltip_event.szCalltip.try_open_calltip_eventcCs$|jr|jjr|�d�dSdSdSr)rZ	tipwindowrrrrr
�refresh_calltip_event5s�zCalltip.refresh_calltip_eventcCs�	t|jd�}|�d�}|s|��dS|jr1tt|d�d��\}}||f|jj|jj	fkr1dS|�
|d�z|��}WntyId}Ynw|sNdS|��|s]|�
d�dkr]dS|�|�}|sfdS|��|_|j�||d|d�dS)N�insert�(r�.����)rrZget_surrounding_bracketsrr�map�int�splitZ	parenlineZparencolZ	set_indexZget_expression�
ValueError�find�	fetch_tipr
Zshowtip)rZ	evalfuncsZhpZ	sur_parenZopener_lineZ
opener_col�
expression�argspecrrr
r9s8
��

zCalltip.open_calltipcCsN	z	|jjjjj}Wntyd}Ynw|r!|�dd|fi�Stt|��S)N�execZget_the_calltip)	r�flistZpyshellZinterp�rpcclt�AttributeErrorZ
remotecall�get_argspec�
get_entity)rr&r*rrr
r%ls
��zCalltip.fetch_tipr)�__name__�
__module__�__qualname__rrr	rrrrrr%rrrr
rs
	
3rcCs<	|ritj�tj�}zt||�WStyYdSwdSr)�sys�modules�__main__�__dict__�eval�
BaseException)r&�	namespacerrr
r-�s��r-�U�z    z(?<=\()\w*\,?\s*zSee source or doczinvalid method signaturec	
CsH	z|j}Wn
tyYdSwt|tj�r|n|}z	tt�|��}Wn%tyI}zt|�}|�	t
�r=t
WYd}~Sd}WYd}~nd}~wwt|t�rU|dkrUt}t
|�tkrctj|ttd�n|rh|gng}t�|�}|r�|�dt�dt�D]}|��}|s�nt
|�tkr�|dtd�d}|�|�q{d�|�}|p�tS)N�z())�subsequent_indent�
�z...)�__call__r6�
isinstance�types�
MethodType�str�inspectZ	signature�	Exception�
startswith�_invalid_method�type�_default_callable_argspec�len�	_MAX_COLS�textwrap�wrap�_INDENTZgetdocr"�
_MAX_LINES�strip�append�join)	�obZob_callZfobr'�err�msg�lines�doc�linerrr
r,�sB	
�
����

r,r3)�mainzidlelib.idle_test.test_calltip�)�	verbosity)r3rC�rer1rKr@ZidlelibrZidlelib.hyperparserrrr-rJrNrM�compileZ_first_paramrHrFr,r.ZunittestrXrrrr
�<module>s,s
1�