tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Z\¬Qc@sMdZddlZddlZddlZddlmZddlmZddlZddd„ƒYZ    d„Z
d„Z e d    krId
„Z dd „Zd „Zd „Zd„Zdd„Zd„Zdefd„ƒYZd„ZeƒZe eeeeeeeej ejejejejejejfZeeƒndS(sCallTips.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.
 
iÿÿÿÿN(t CallTipWindow(t HyperParsertCallTipscBszeZdd gfgZdd„Zd„Zd„Zdd„Zd„Zd„Z    d    „Z
d
„Z d „Z d „Z RS(tedits Show call tips<<force-open-calltip>>cCsG|dkrd|_dS||_|j|_d|_|j|_dS(N(tNoneteditwinttexttcalltipt_make_tk_calltip_windowt_make_calltip_window(tselfR((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyt__init__s              cCs d|_dS(N(RR    (R
((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pytclose"scCstj|jƒS(N(RtCallTipR(R
((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyR%scCs&|jr"|jjƒd|_ndS(N(RthidetipR(R
tevent((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyt_remove_calltip_window)s     cCs|jtƒdS(siHappens when the user really wants to open a CallTip, even if a
        function call is needed.
        N(t open_calltiptTrue(R
R((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pytforce_open_calltip_event.scCs|jtƒdS(sªHappens 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.
        N(RtFalse(R
R((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyttry_open_calltip_event4scCs,|jr(|jjƒr(|jtƒndS(siIf there is already a calltip window, check if it is still needed,
        and if so, reload it.
        N(Rt    is_activeRR(R
R((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pytrefresh_calltip_event;scCsÃ|jƒt|jdƒ}|jdƒ}|s5dS|j|dƒ|jƒ}| su| ry|jdƒdkrydS|j|ƒ}|s’dS|jƒ|_    |j    j
||d|dƒdS(Ntinsertt(iiÿÿÿÿi( RRRtget_surrounding_bracketst    set_indextget_expressiontfindt    fetch_tipR    Rtshowtip(R
t    evalfuncsthpt    sur_parent
expressiontarg_text((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyRBs
 #cCsoy|jjjjj}Wntk
r2d}nX|rR|jdd|fiƒS|j|ƒ}t    |ƒSdS(sRReturn the argument list and docstring of a function or class
 
        If there is a Python subprocess, get the calltip there.  Otherwise,
        either fetch_tip() is running in the subprocess itself or it was called
        in an IDLE EditorWindow before any script had been run.
 
        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.
 
        texectget_the_calltipN(
RtflisttpyshelltinterptrpcclttAttributeErrorRt
remotecallt
get_entityt get_arg_text(R
R#R*tentity((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyRSs 
  cCsR|rNtjjƒ}|jtjƒyt||ƒSWqNtk
rJdSXndS(sReturn the object corresponding to expression evaluated
        in a namespace spanning sys.modules and __main.dict__.
        N(    tsystmodulestcopytupdatet__main__t__dict__tevalt BaseExceptionR(R
R#t    namespace((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyR-ls (s Show call tips<<force-open-calltip>>N(t__name__t
__module__tmenudefsRR R RRRRRRRR-(((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyRs                                 cCsVy|jjSWnAtk
rQx1|jD]"}t|ƒ}|dk    r(|Sq(WnXdS(N(R tim_funcR+t    __bases__t_find_constructorR(tclass_obtbasetrc((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyR>zs   c
Cs#d}|dk    rt|dƒrd}t|ƒtjtjfkrrt|ƒ}|dkrid„}qŸd}n-t|ƒtjkr™|j}d}n|}t|ƒtj    tj
gkr¤|j j }|j j ||!}|jpèg}ttd„|ƒƒ}dgt|ƒt|ƒ|}td„||ƒ}|j jd@rY|jd    ƒn|j jd
@ry|jd ƒnd j|ƒ}d tjdd|ƒ}nt|ddƒ}|r|jƒ}|jdƒ}    |    dksï|    dkrød}    n|r |d7}n|||     7}qn|S(sZGet a string describing the arguments for the given object,
       only if it is callable.tt__call__icSsdS(N(R(((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyt<lambda>sicSsdt|ƒS(Ns=%s(trepr(tname((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyRDžscSs||S(N((targtdflt((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyRD sis...is***s, s(%s)s\.\d+s<tuple>t__doc__s
iFN(Rthasattrttypettypest    ClassTypetTypeTypeR>t
MethodTypeR<t FunctionTypet
LambdaTypet    func_codet co_argcountt co_varnamest func_defaultstlisttmaptlentco_flagstappendtjointretsubtgetattrtlstripR(
tobR$t
arg_offsettfobtargcountt    real_argstdefaultstitemstdoctpos((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyR.…sF                !      R4cCsdS(s()N((((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pytt1¹scCsdS(s (a, b=None)N((tatb((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pytt2ºscGsdS(s(a, ...)N((Rjtargs((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pytt3»scGsdS(s(...)N((Rm((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pytt4¼scGsdS(s(a, ...)N((RjRm((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pytt5½scOsdS(s(a, b=None, ..., ***)N((RjRkRmtkw((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pytt6¾scCs|\}}|\}}dS(s(<tuple>, c, <tuple>)N((t.0tct.2RjRktdte((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pytt7¿stTCcBs_eZdZd    d„Zd„Zd    d„Zd„Zd„Zd„Z    d    d„Z
d„Z RS(
s(ai=None, ...)cGsdS(s(ai=None, ...)N((R
taiRk((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyR ÃscCsdS(s()N((R
((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyRiÄscCsdS(s (ai, b=None)N((R
RzRk((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyRlÅscGsdS(s    (ai, ...)N((R
RzRm((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyRnÆscGsdS(s(...)N((R
Rm((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyRoÇscGsdS(s    (ai, ...)N((R
RzRm((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyRpÈscOsdS(s(ai, b=None, ..., ***)N((R
RzRkRmRq((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyRrÉscCs|\}}|\}}dS(s(<tuple>, c, <tuple>)N((R
t.1Rtt.3RzRkRvRw((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyRxÊsN( R9R:RIRR RiRlRnRoRpRrRx(((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyRyÁs                   c    CsÜtƒ}g}x«|D]£}|jd|j}|j}yd|jj|f}Wntk
rl|}nX|j|ƒ}||kr|j|ƒd}||j|t|ƒfGHqqWdt|ƒt|ƒfGHdS(Ns
s%s.%ss%s - expected %s, but got %ss%d of %d tests failed(    RRIR9tim_classR+RRZR.RX(    tteststcttfailedtttexpectedRFtqualified_nameR$tfmt((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyttestÌs          
  "((RIR\R0RLtidlelibRtidlelib.HyperParserRR4RR>R.R9RiRRlRnRoRpRrRxtobjectRyR…ttcR~(((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/CallTips.pyt<module>s.    i        2                               3