PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  pY,@sdZddlZddlZddlZddlZddlZddlZddlmZddl m Z GdddZ ddZ d Z d ZdZejd ZdZddZedkrddlmZeddddS)aCallTips.py - An IDLE Extension to Jog Your Memory Call Tips are floating windows which display function, class, and method parameter and docstring information when you type an opening parenthesis, and which disappear when you type a closing parenthesis. N) CallTipWindow) HyperParserc@seZdZddgfgZdddZddZd d Zdd d Zd dZddZ ddZ ddZ ddZ dS)CallTipsZedit Show call tip<>NcCsF|dkrd|_n*||_|j|_d|_|j|_dS)N)editwintextactive_calltip_make_tk_calltip_window_calltip_window)selfrr '/opt/python35/lib/python3.5/CallTips.py__init__s      zCallTips.__init__cCs d|_dS)N)r )r r r rclose#szCallTips.closecCstj|jS)N)rZCallTipr)r r r rr &sz CallTips._make_tk_calltip_windowcCs#|jr|jjd|_dS)N)r Zhidetip)r eventr r r_remove_calltip_window*s  zCallTips._remove_calltip_windowcCs|jddS)z9The user selected the menu entry or hotkey, open the tip.TN) open_calltip)r rr r rforce_open_calltip_event/sz!CallTips.force_open_calltip_eventcCs|jddS)zHappens when it would be nice to open a CallTip, but not really necessary, for example after an opening bracket, so function calls won't be made. FN)r)r rr r rtry_open_calltip_event3szCallTips.try_open_calltip_eventcCs)|jr%|jjr%|jddS)NF)r Z is_activer)r rr r rrefresh_calltip_event:szCallTips.refresh_calltip_eventcCs|jt|jd}|jd}|s5dS|j|d|j}|s\dS| r||jddkr|dS|j|}|sdS|j|_ |j j ||d|ddS)Ninsert(r) rrrZget_surrounding_bracketsZ set_indexZget_expressionfind fetch_tipr r Zshowtip)r Z evalfuncsZhpZ sur_paren expressionargspecr r rr>s   zCallTips.open_calltipc Csgy|jjjjj}Wntk r3d}YnX|rS|jdd|fiStt|SdS)aDReturn the argument list and docstring of a function or class. If there is a Python subprocess, get the calltip there. Otherwise, either this fetch_tip() is running in the subprocess or it was called in an IDLE running without the subprocess. The subprocess environment is that of the most recently run script. If two unrelated modules are being edited some calltips in the current module may be inoperative if the module was not the last to run. To find methods, fetch_tip must be fed a fully qualified name. NexecZget_the_calltip) rflistZpyshellZinterprpccltAttributeErrorZ remotecall get_argspec get_entity)r rr!r r rrQs    zCallTips.fetch_tip)rr) __name__ __module__ __qualname__Zmenudefsrrr rrrrrrr r r rrs       rc CsS|rOtjj}|jtjyt||SWntk rNdSYnXdS)zwReturn the object corresponding to expression evaluated in a namespace spanning sys.modules and __main.dict__. N)sysmodulescopyupdate__main____dict__eval BaseException)r namespacer r rr$is r$U z(?<=\()\w*\,?\s*zSee source or docc Csd}y |j}Wntk r+|SYnXt|trG|j}n!t|tjrb|}n|}t|tjtjfrtj tj |}t|ttjfst|tjrt j d|}t |tkrtj|tdtn|r|gng}t|tjr4|j}nt|dd}|rxn|jdtdtD]P}|j}|sPt |tkr|dtdd}|j|qiWdj|}|st}|S)aReturn a string describing the signature of a callable object, or ''. For Python-coded functions and methods, the first line is introspected. Delete 'self' parameter for classes (.__init__) and bound methods. The next lines are the first lines of the doc string up to the first empty line or _MAX_LINES. For builtins, this typically includes the arguments in addition to the return value. subsequent_indent__doc__ Nz...)__call__r/ isinstancetypertypes MethodType FunctionTypeinspectZ formatargspecZgetfullargspec _first_paramsublen _MAX_COLStextwrapwrap_INDENTr7getattrsplit _MAX_LINESstripappendjoin_default_callable_argspec)obrZob_callZfoblinesdocliner r rr#s>      ? # r#r,)mainzidlelib.idle_test.test_calltips verbosityz )r7r,r@rer(rEr=ZidlelibrZidlelib.HyperParserrrr$rDrJrGcompilerArNr#r%ZunittestrSr r r rs&      W  .