<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

Š¹¼],  ã               @   sê   d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l m Z d  d l m	 Z	 Gd d „  d ƒ Z
 d d „  Z d Z d	 Z d Z e j d ƒ Z d Z d d „  Z e d k ræ d  d l m Z e d d d ƒd S)é    N)ÚCallTipWindow)ÚHyperParserc               @   s”   e  Z d  Z d d g f g Z d d d „ Z d d „  Z d	 d
 „  Z d d d „ Z d d „  Z d d „  Z	 d d „  Z
 d d „  Z d d „  Z d S)ÚCallTipsZeditúShow call tipú<<force-open-calltip>>Nc             C   sF   | d  k r d  |  _  n* | |  _  | j |  _ d  |  _ |  j |  _ d  S)N)ÚeditwinÚtextÚactive_calltipÚ_make_tk_calltip_windowÚ_calltip_window)Úselfr   © r   ú-/opt/alt/python35/lib64/python3.5/CallTips.pyÚ__init__   s    		zCallTips.__init__c             C   s   d  |  _  d  S)N)r   )r   r   r   r   Úclose#   s    zCallTips.closec             C   s   t  j |  j ƒ S)N)r   ZCallTipr   )r   r   r   r   r
   &   s    z CallTips._make_tk_calltip_windowc             C   s#   |  j  r |  j  j ƒ  d  |  _  d  S)N)r	   Zhidetip)r   Úeventr   r   r   Ú_remove_calltip_window*   s    	zCallTips._remove_calltip_windowc             C   s   |  j  d ƒ d  S)NT)Úopen_calltip)r   r   r   r   r   Úforce_open_calltip_event/   s    z!CallTips.force_open_calltip_eventc             C   s   |  j  d ƒ d  S)NF)r   )r   r   r   r   r   Útry_open_calltip_event3   s    zCallTips.try_open_calltip_eventc             C   s)   |  j  r% |  j  j ƒ  r% |  j d ƒ d  S)NF)r	   Z	is_activer   )r   r   r   r   r   Úrefresh_calltip_event:   s    zCallTips.refresh_calltip_eventc             C   sÆ   |  j  ƒ  t |  j d ƒ } | j d ƒ } | s5 d  S| j | d ƒ | j ƒ  } | s\ d  S| r| | j d ƒ d k r| d  S|  j | ƒ } | s• d  S|  j ƒ  |  _	 |  j	 j
 | | d | d ƒ d  S)NÚinsertú(r   é   éÿÿÿÿ)r   r   r   Zget_surrounding_bracketsZ	set_indexZget_expressionÚfindÚ	fetch_tipr   r	   Zshowtip)r   Z	evalfuncsZhpZ	sur_parenÚ
expressionÚargspecr   r   r   r   >   s     
zCallTips.open_calltipc             C   sg   y |  j  j j j j } Wn t k
 r3 d  } Yn X| rS | j d d | f i  ƒ St t | ƒ ƒ Sd  S)NÚexecZget_the_calltip)	r   ÚflistZpyshellZinterpÚrpccltÚAttributeErrorZ
remotecallÚget_argspecÚ
get_entity)r   r   r!   r   r   r   r   Q   s    zCallTips.fetch_tip)r   r   )Ú__name__Ú
__module__Ú__qualname__Zmenudefsr   r   r
   r   r   r   r   r   r   r   r   r   r   r      s   	r   c             C   sS   |  rO t  j j ƒ  } | j t j ƒ y t |  | ƒ SWn t k
 rN d  SYn Xd  S)N)ÚsysÚmodulesÚcopyÚupdateÚ__main__Ú__dict__ÚevalÚBaseException)r   Ú	namespacer   r   r   r$   i   s    r$   éU   é   ú é   z(?<=\()\w*\,?\s*zSee source or docc             C   sÜ  d } y |  j  } Wn t k
 r+ | SYn Xt |  t ƒ rG |  j } n! t | t j ƒ rb | } n |  } t | t j t j f ƒ r× t j	 t j
 | ƒ Œ  } t |  t t j f ƒ sÅ t | t j ƒ r× t j d | ƒ } t | ƒ t k rt j | t d t ƒn | r| g n g  } t | t j ƒ r4| j } n t |  d d ƒ } | rÌxn | j d t ƒ d  t … D]P } | j ƒ  } | s‚Pt | ƒ t k r¬| d  t d … d } | j | ƒ qiWd j | ƒ } | sØt } | S)NÚ Úsubsequent_indentÚ__doc__Ú
é   z...)Ú__call__r/   Ú
isinstanceÚtyper   ÚtypesÚ
MethodTypeÚFunctionTypeÚinspectZformatargspecZgetfullargspecÚ_first_paramÚsubÚlenÚ	_MAX_COLSÚtextwrapÚwrapÚ_INDENTr7   ÚgetattrÚsplitÚ
_MAX_LINESÚstripÚappendÚjoinÚ_default_callable_argspec)Úobr   Zob_callZfobÚlinesÚdocÚliner   r   r   r#      s>    			?#r#   r,   )Úmainzidlelib.idle_test.test_calltipsÚ	verbosityé   z    )r,   r@   Úrer(   rE   r=   Zidlelibr   Zidlelib.HyperParserr   r   r$   rD   rJ   rG   ÚcompilerA   rN   r#   r%   ZunittestrS   r   r   r   r   Ú<module>   s$   W.