ML iUdZddlmZddlmZddlmZmZmZm Z m Z m Z m Z m Z mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4ddl5m6Z6m7Z7m8Z8m9Z9ddl:m;Z;ddlm?Z?m@Z@dd lAmBZBdd lCmDZDdd lEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^m_Z_m`Z`dd lambZbdd lcmdZd ddZe ddZfGddeBZg d ddZhGdde[eiejZkddZlddZmd dZn d!dZoy)"aGenerate fine-grained dependencies for AST nodes, for use in the daemon mode. Dependencies are stored in a map from *triggers* to *sets of affected locations*. A trigger is a string that represents a program property that has changed, such as the signature of a specific function. Triggers are written as '<...>' (angle brackets). When a program property changes, we determine the relevant trigger(s) and all affected locations. The latter are stale and will have to be reprocessed. An affected location is a string than can refer to a *target* (a non-nested function or method, or a module top level), a class, or a trigger (for recursively triggering other triggers). Here's an example representation of a simple dependency map (in format " -> locations"): -> m.f -> , m.A, m.f Assuming 'A' is a class, this means that 1) if a property of 'm.A.g', such as the signature, is changed, we need to process target (function) 'm.f' 2) if the MRO or other significant property of class 'm.A' changes, we need to process target 'm.f', the entire class 'm.A', and locations triggered by trigger '' (this explanation is a bit simplified; see below for more details). The triggers to fire are determined using mypy.server.astdiff. Examples of triggers: * '' represents a module attribute/function/class. If any externally visible property of 'x' changes, this gets fired. For changes within classes, only "big" changes cause the class to be triggered (such as a change in MRO). Smaller changes, such as changes to some attributes, don't trigger the entire class. * '' represents the type and kind of attribute/method 'x' of class 'mod.Cls'. This can also refer to an attribute inherited from a base class (relevant if it's accessed through a value of type 'Cls' instead of the base class type). * '' represents the existence of module 'package.mod'. This gets triggered if 'package.mod' is created or deleted, or if it gets changed into something other than a module. Examples of locations: * 'mod' is the top level of module 'mod' (doesn't include any function bodies, but includes class bodies not nested within a function). * 'mod.f' is function 'f' in module 'mod' (module-level variables aren't separate locations but are included in the module top level). Functions also include any nested functions and classes -- such nested definitions aren't separate locations, for simplicity of implementation. * 'mod.Cls.f' is method 'f' of 'mod.Cls'. Non-method attributes aren't locations. * 'mod.Cls' represents each method in class 'mod.Cls' + the top-level of the module 'mod'. (To simplify the implementation, there is no location that only includes the body of a class without the entire surrounding module top level.) * Trigger '<...>' as a location is an indirect way of referring to all locations triggered by the trigger. These indirect locations keep the dependency map smaller and easier to manage. Triggers can be triggered by program changes such as these: * Addition or deletion of an attribute (or module). * Change of the kind of thing a name represents (such as a change from a function to a class). * Change of the static type of a name. Changes in the body of a function that aren't reflected in the signature don't cause the function to be triggered. More generally, we trigger only on changes that may affect type checking results outside the module that contains the change. We don't generate dependencies from builtins and certain other stdlib modules, since these change very rarely, and they would just increase the size of the dependency map significantly without significant benefit. Test cases for this module live in 'test-data/unit/deps*.test'. ) annotations) defaultdict)/GDEFLDEFMDEFSYMBOL_FUNCBASE_TYPESAssertTypeExprAssignmentStmt AwaitExprBlockCallExprCastExprClassDefComparisonExpr DecoratorDelStmtDictionaryComprehension EnumCallExpr ExpressionForStmtFuncBaseFuncDef GeneratorExprImport ImportAll ImportFrom IndexExpr MemberExprMypyFileNamedTupleExprNameExpr NewTypeExprNodeOperatorAssignmentStmtOpExprOverloadedFuncDefRefExprStarExpr SuperExpr TupleExpr TypeAliasExprTypeApplication TypedDictExprTypeInfo TypeVarExpr UnaryExprVarWithStmt YieldFromExpr) op_methodsops_with_inplace_methodreverse_op_methodsunary_op_methods)Options)Scope) make_triggermake_wildcard_trigger)TraverserVisitor) bind_self)AnyType CallableType DeletedType ErasedType FunctionLikeInstance LiteralTypeNoneType Overloaded Parameters ParamSpecType PartialType ProperType TupleTypeType TypeAliasType TypedDictType TypeOfAnyTypeTypeTypeVarTupleType TypeVarType TypeVisitor UnboundTypeUninhabitedType UnionType UnpackTypeget_proper_type) type_state)correct_relative_importclt|||j|}|j||jS)z,Get all dependencies of a node, recursively.)DependencyVisitor alias_depsacceptmap)targettype_mappython_versionoptionsvisitors V/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/mypy/server/deps.pyget_dependenciesrfs0 .&:K:KWUG MM' ;;c Xt|||j}|jj|5t |t rD|j D]4}t |ttttfr$|j|6nmt |trL|jr@|jj|j5|j|dddn|j|ddd|jS#1swYxYw#1swY|jSxYw)zDGet dependencies of a target -- don't recursive into nested targets.N)r\r]scope module_scope isinstancerdefsrrrr&r^rinfo class_scoper_) module_id module_treer`rarbrddefns reget_dependencies_of_targetrrs .+:P:PQG  # #I .# fh '  )!$9gGX(YZKK( ) )fkk**6;;7 ' g& ' ' MM' "# ;;  ' '# ;;s+AD4AD D D D DD)c&eZdZ d3 d4dZd5fd Zd6fd Zd7fd Zd8fd Zd9dZd:dZ d;dZ dfd Z d?fd Zd@d ZdAdZdBdZdCfd ZdDfd ZdEfd ZdFfd ZdGdZdHdZdIfd ZdJdZdKfd ZdLfd ZdLfd ZdMfd ZdNfd ZdOfd ZdPfd Z dQfd Z!dRfd Z"dSfd! Z#dTd"Z$dUd#Z%dVd$Z&dWfd% Z'dXfd& Z(dYfd' Z)dZfd( Z*d[fd) Z+d\d*Z,d3d]d+Z-d3d^d,Z.d_d-Z/d`d.Z0dad/Z1dbd0Z2dcd1Z3ddd2Z4xZ5S)er\cvt|_||_||_i|_d|_d|_||_y)NF)r9rirar]r_is_classis_package_init_filerc)selfrarbr]rcs re__init__zDependencyVisitor.__init__s:W   %(* $)! rgc|jj|j5|j|_|j |jj |j jD]8\}}|jj|tj|:t|5|dddy#1swYyxYwN)rirjfullnamervadd_type_alias_depscurrent_target plugin_depsitemsr_ setdefaultsetupdatesupervisit_mypy_file)rwotriggertargets __class__s rerz!DependencyVisitor.visit_mypy_files ZZ $ $QZZ 0 '()(>(>(@D %  $ $TZZ%>%>%@ A$%MM$7$7$9 D ##GSU3::7C D G #A &  ' ' 's B#CCc|jj|5|jj}|jr|jr0t |jt rt|j}n |j}|j|D]/}|j||j|t|1|jrmt|jD]U}|jr|jdvs"|jt|jdz|jzW|j!|jjt"|I|t'|j(|hz }|D]"}t |t*st"|I|$ dddy#1swYyxYw)Nr`rx__new__.)rifunction_scoper}typerurkrBr=get_type_triggersadd_dependencyr:rmnon_trivial_basesuse_logical_depsnamer{r|rvisit_func_defrexpandedr) rwrr` signaturerbasevariantsexrs rerz DependencyVisitor.visit_func_defsv ZZ & &q ) /ZZ..0Fvv==Z %E&/&7I !I#55i@NG''0'' V8L'MNvv-aff5XD 002affD[6[++L9Lqvv9U,VW X  $ $TZZ%>%>%@ A G "1 %1::!,H /b'*G*2. /' / / /sC4G BG /G  Gc|js`|jjs|jj |j t |jjn|jD]}d}t|tr|jr |j}t|trFt|jtr,|jjr|jj}||j t |t |jjt|9|yrz)rfunc is_overloadricurrent_function_namerr:r{ decoratorsrkr'r calleervisit_decorator)rwrdtnamers rerz!DependencyVisitor.visit_decorators$$&66%%$***J*J*L*T##L$AB\\ \$(a)ajjJJEa*z!((G/LQRQYQYQbQbHH--E$'' U(;\!&&//=Z[ \ "rgc|jj|j5|jj}|j t |||j }d|_|jD]'}|j t |j|)|j|jt|-|||_dddy#1swYyxYw)NT) rirnrmcurrent_full_targetrr:ru type_varsr{process_type_inforvisit_class_def)rwrr` old_is_classtvrs rerz!DependencyVisitor.visit_class_def,s ZZ # #AFF + )ZZ335F    V 4f ===L DMkk G##L$=vF G  " "166 * G #A &(DM ) ) )s B0C  C)c|jrJ|jj|j5|j|jdddyy#1swYyxYwrz)rmrirnrrwrs revisit_newtype_exprz$DependencyVisitor.visit_newtype_expr9sP 66''/ /&&qvv. / /  / /s AA!c z|jj}|jD]}|j|||jr&|j|jt ||j r&|j|j t ||jr&|j|jt ||jrC|jddD]1}|jt|jt |3|j|jj|jj!D]\}}t#|j$t&s!|j$j(r5t+|r*|jt |jdz|zt-|D]G}|jt |jdz|zt |jdz|zIt-|D]}|jj!D]n\}}|j/r||jvr%|dvr*|jt |jdz|zt |jdz|zp|j/r|jt |jdzt |jdz|jt |jdzt |jdz|jt |jdzt |jdz|jt |jdzy)Nrrr .__init__.__new__z .(abstract))rirbasesadd_type_dependencies tuple_typer:typeddict_typedeclared_metaclass is_protocolmrorr;r{r|r}namesrrknoder1is_initialized_in_classhas_user_basesrr)rwrmr`r base_inforrs rerz#DependencyVisitor.process_type_info>sO//1JJ '>|TZG[ & \   !XXcr]  ##))*<*<=lSYFZ$ "   !:!:!<=****, JD$$))S)99449M'' T]]S5H45O(PQ!24!8I''$Y%7%7#%=%DE+DMMC,?$,FG( +40+ VI'oo335  d((*4::- 66 ## !3!3c!9D!@A' (;d(BC$# *((*## !3!3k!AB' (CD$## !3!3j!@A' (BC$## !3!3m!CD' (CD$ ##L1C1Cm1S$TUW+ Vrgc|jD]8\}}|jt||jj :yrz)idsrr:rir})rwridas_ids re visit_importzDependencyVisitor.visit_imports= OIB    R 0$**2K2K2M N OrgcP|jryt|jj|j|j |j \}}|jt||jD]%\}}|jt|dz|z'yNr) rrZricurrent_module_idrelativerrvrr:r)rwrro_ras_names revisit_import_fromz#DependencyVisitor.visit_import_froms  " . JJ ( ( *AJJd>W>W 1 L34WW FMD'    Y_t-C D E Frgct|jj|j|j|j \}}|j t|yrz)rZrirrrrvrr;)rwrrors revisit_import_allz"DependencyVisitor.visit_import_allsJ. JJ ( ( *AJJd>W>W 1 1)<=rgc>|jst| |yyrz)is_unreachabler visit_blockrwrrs rerzDependencyVisitor.visit_blocks G  " rgcn |j}t|trt|jtr|j}|j |j t|j|jD](}|j |t|j*t|-|n~t|trt|jtr|jj}|jjd|j }|j"j%D]\}}|j'drt|j(t*s3|j(j,} | sL|j | |j | t|t|d|} |j | | nZt|trt|jt.ru|jj}|j0J|jjd|j }|j |j0t|nt|trt|jt2r|jjj"j%D]\\}}t|j(t*s!|j(j,s8|j |j(j,^n|j4rAt7|j8dk(sJ|j8d} t| t:sJt=|j>jA| } t| tBrd| jErT| jGj} |jIt| dz|jIt| dzt|tJrJt|jtLr0|j |jj(jNn| r|j | nt|||j8D]} |jS| |j8|gz} tUt7| dz D]2}| |} | |dz}t| tVs!|jY|d4|j,r|j |j,|j[rk|j\]t|trKt|j^t`r/|j^jrd}t|j^j(tbrX|j^j(jAd }|rGt|j(tdr-|j(j}n|j^j}|sy|j8D]p}t|t`s|js!|jfs.|jhtjk(ry|jIt|t|jryyyyyy) Nrrrrrr__iter__rx)6rvaluerkr analyzedr/r upper_boundr:r{valuesrvisit_call_exprr rmrirrrr startswithrr1rr-rr is_alias_deflenlvaluesr!rXragetrB is_type_obj type_objectrrr+r`visit_assignment_stmtprocess_lvalueranger*!add_attribute_dependency_for_exprrunanalyzed_typerr'r.r is_new_defkindr)rwrrrvalrmprefixrsymnodetyp attr_targetlvalue class_namerifnameinitlvrs rerz'DependencyVisitor.visit_assignment_stmts fh 'Jv ,TH  & &$$\(:K:K-L '   X**3|HDUDU7V*W X G #F +  )j..Y??''D 6689499+FF!%!1!1!3 L gs+ 7<<0M!,,++C2237223|F?S2T&2fXQtf3E&F 223{2K L )j-.X??''D&&2 22 6689499+FF  & &t':':Q& &&YYq\Ffh/ //!$--"3"3F";* Oqq1ufi0::6:N  O vv**1662  "q'8'8'@ 68,v}}g6MM**$(fmm00(;!==--11*=D 4996K L $ 2 2"MM22E))\B!"g.2;;2==77d?"++L,?bkkAZ[ \+7- (A "rgct|tr|j|jdyt|tr|j t tfvrn|j|}|j|}t|jjd|j}|D]}|j||yyt|tr"|j!|ru|j"ri|j$}t|t&rM|j(}|r?t+|r4|jt|j,dz|jz|j |j.|j0vry|j0|j.}|j|}|j|}|j3||jD]}|D]}|j||yyt|t4r#|j6D]} |j9| yt|t:r|j9|j.yy)z/Generate additional dependencies for an lvalue. __setitem__rN)rkradd_operator_method_dependencyrr!rrrget_non_partial_lvalue_typerr:rirrrris_self_member_refrrr1rmrr{exprraattribute_triggersr*rrr() rwr lvalue_type type_triggers attr_trigger type_triggerrrm object_typeitems rerz DependencyVisitor.process_lvalues fi (  / / ] K  ){{tTl*#>>vF $ 6 6{ C +tzz/M/M/O.PPQRXR]R]Q^,_` $1DL'' lCD + +&&v.63D3D{{dC(99Dt 4++L9Lv{{9Z,[\{{";;dmm3"mmFKK8 ">>vF $ 6 6{ C $($;$;K$UHL(5H ++L,GHH# *  *##D) *  )    ,*rgct|jtsy|jj}t|txr |j S)z1Does memberexpr to refer to an attribute of self?F)rkrr!rr1is_self)rw memberexprrs rerz$DependencyVisitor.is_self_member_ref+s8*//84##$$55rgcp||jvr tSt|j|}t|trut|j t rC|j jr!t|j j}|St}|S|jrJtS|Srz) rarUrXrkrIrr1rr)rwrrs rerz-DependencyVisitor.get_non_partial_lvalue_type2s  &"$ $%dmmF&;< k; /&++s+;;##"1&++2B2B"CK#2"3K",,,,&((rgc&t|||j|jt|j }|j |j||j tvr%d|ddz}|j |j|yy)N__i)rvisit_operator_assignment_stmtrrr4oprr5)rwrmethodinplace_methodrs rerz0DependencyVisitor.visit_operator_assignment_stmtGsz .q1 AHH%ADD! ..qxx@ 44* *"VABZ/N  2 2188^ L +rgct|||jsa|j|jd|j|jd|j ra|j |j dnD|j|jd|j r|j |j d|j|jt|jtr2|j}|r$|j |d|j |d|jr|j|jyy)Nr __getitem____next__ __aiter__ __anext__)rvisit_for_stmtis_asyncrrinferred_iterator_typeadd_attribute_dependencyrindexrkr*inferred_item_type index_typer)rwr item_typers rerz DependencyVisitor.visit_for_stmtPs q!zz  2 2166: F  2 2166= I''--a.F.F S  2 2166; G''--a.F.F T AGG$ aggy ),,I--iD--iG <<  & &q|| 4 rgc4t|||jD]W}|js%|j |d|j |d4|j |d|j |dY|j D]}|j |y)N __enter____exit__ __aenter__ __aexit__)rvisit_with_stmtrrranalyzed_typesr)rwrerrs rerz!DependencyVisitor.visit_with_stmtis " GA::66q+F66q*E66q,G66q+F  G## ,C  & &s + ,rgct||t|jtr'|j |jj dyy)N __delitem__)rvisit_del_stmtrkrrrrrs rer z DependencyVisitor.visit_del_stmtus; q! affi (  2 2166;; N )rgc|jr$|jt|jt|jj |}t |trf|jrU|jj}|jt|dz|jt|dzyyy)Nrr) r{rr:rXrarrkrBrr)rwrrrs reprocess_global_ref_exprz)DependencyVisitor.process_global_ref_expr|s ::    QZZ 8 9 dmm//23 c< (S__->*33J    Z+-E F G    Z*-D E F.? (rgcv|jtk(ry|jtk(ry|j|yrz)rrrr"rs revisit_name_exprz!DependencyVisitor.visit_name_exprs0 66T>  66T>  $$Q'rgct|jtr]t|jjtr9|j t |jjjnt|%||j|j|y|j|jvryt|jtrmt|jjtrI|j t |jjjdz|jzyt|j|j}|j!||j|j#rAt|t$r0|j'||}||j t |yyyyr)rkrr'rr.rr:r{rvisit_member_exprrr"rarrrXrrr>get_unimported_fullname)rwrrrrs rer&z#DependencyVisitor.visit_member_exprsK affg &:affkk8+L    QVV[[-A-A B C G %a ( 66   ( ( +vvT]]*!&&'*z!&&++x/P##L1E1E1Kaff1T$UV!$--"78C  ) )#qvv 6$$&:c7+C33As;#'' T(:;$,D&rgcNd}|jtjk(rt|jt rd|j z|z}|j}|j|jvryt|j|j}t|tsy|}|jtjk(rt|jt r|jtjk(r+|jr|jdz|j z|zSy)zIf e refers to an unimported definition, infer the fullname of this. Return None if e doesn't refer to an unimported definition or if we can't determine the name. rN) type_of_anyrOfrom_another_anyrkrrrrarXr>from_unimported_typemissing_import_name)rwrrsuffixobj_types rer'z)DependencyVisitor.get_unimported_fullnames  oo!;!;; 166S]@^166\F*FAvvT]]*&t}}QVV'<=Hh0Coo!;!;; 166S]@^ ??i<< <AXAX**S01669FB Brgc|jst| ||ja|j}t |jD]<}|j t|jdz|z||jvs<yyyr) rrvisit_super_exprrmrrrr:r{r)rwrrrrs rer1z"DependencyVisitor.visit_super_exprs~$$& G $Q ' 66 66D)!&&1 ##L1Dt1K$LM4::%   rgcZt|jtr+|jjdk(r|j |yt |||jj|j}|/t|}t|ts|j|dyyy)Nzbuiltins.isinstance__call__) rkrr'r{process_isinstance_callrrrarrXrBrrwrrrs rerz!DependencyVisitor.visit_call_exprs ahh (QXX->->BW-W  ( ( + G #A &--##AHH-C%c*!#|411#zB5rgcNt|jdk(r}|jd}t|tr^|jt k(rKt|j tr1|jr%|jt|jyt|1|y)zDProcess "isinstance(...)" in a way to avoid some extra dependencies.rrN) rargsrkr'rrrr.r{rr:rr)rwrargrs rer4z)DependencyVisitor.process_isinstance_callsv qvv;! &&)C3(HH$sxx2LL##L$>? "rgcZt|||j|jyrz)rvisit_cast_exprrrrwrrs rer:z!DependencyVisitor.visit_cast_exprs" " ""166*rgcZt|||j|jyrz)rvisit_assert_type_exprrrr;s rer=z(DependencyVisitor.visit_assert_type_exprs" &q) ""166*rgcht|||jD]}|j|yrz)rvisit_type_applicationtypesrr5s rer?z(DependencyVisitor.visit_type_applications1 &q)77 ,C  & &s + ,rgc\t|||j|jdy)Nr )rvisit_index_exprrrr;s rerBz"DependencyVisitor.visit_index_exprs$  # ++AFFMBrgct|||jtvryt|j}|j |j |yrz)rvisit_unary_exprrr7rr)rwrrrs rerDz"DependencyVisitor.visit_unary_expr sB  # 44' ' !!$$' ++AFFF;rgct|||j|j|j|j yrz)r visit_op_exprprocess_binary_oprleftrightr;s rerFzDependencyVisitor.visit_op_exprs. a  qttQVVQWW5rgct||t|jD]9\}}|j|}|j|dz}|j |||;y)Nr)rvisit_comparison_expr enumerate operatorsoperandsrG)rwrrrrHrIrs rerKz'DependencyVisitor.visit_comparison_exprs] %a(q{{+ 4EAr::a=DJJq1u%E  " "2tU 3 4rgctj|}|rU|dk(r|j||y|j||tj|}|r|j||yyy)Nin)r4rrr6)rwrrHrIr rev_methods rerGz#DependencyVisitor.process_binary_opsg# Tz33E6B33D&A/33F; 77zJ rgcvt|jj|}||j||yyrz)rXrar'add_operator_method_dependency_for_type)rwrrrs rerz0DependencyVisitor.add_operator_method_dependency(s5dmm//23 ?  8 8f E rgct|trt|j}t|tr |j }t|t r7t|jjdz|z}|j|yt|tr-|jD]}|jt||yt|tr-|jr|j|j |yt|t"rmt|j$t rR|j$jj&1|j|j$jj&|yyyyr)rkrRrXrrKpartial_fallbackrCr:rr{rrVrrSrBrfallbackrPrmetaclass_type)rwrrrrs rerSz9DependencyVisitor.add_operator_method_dependency_for_type-s c; '!#//2C c9 %&&C c8 $"388#4#4s#:V#CDG    ( Y '  \<<_T=RTZ[ \ \ *s/@  8 8v N X &#((H-#((--2N2N2Z<ZZ..0F GSU+//7rgcT|j|D]}|j||y)zAdd dependencies to all components of a type. Args: target: If not None, override the default (current) target of the generated dependency. N)rr)rwrr`rs rerz'DependencyVisitor.add_type_dependenciesps.--c2 1G    0 1rgcX|j||}|D]}|j|y)z;Add dependencies for accessing a named attribute of a type.N)rr)rwrrrr`s rerz*DependencyVisitor.add_attribute_dependencyzs1))#t4 (F    ' (rgct|}t|trt|j}t|tr |j }t|t r'|jjd|}t|gSt|trh|jrX|jjd|}t|g}|j|j|j||St|t r6g}|j"D]#}|j|j||%|St|t$r|j|j&|}t|j&t rq|j&jj(Q|j+t|j&jj(jjd||SgS)zH#((H-#((--2N2N2Z CHHMM$@$@$E$E$N$N#OqQUPV!WXOIrgcd|jj|}||j||yyrzrarr)rwrrrs rerz3DependencyVisitor.add_attribute_dependency_for_exprs0mm" ?  ) )#t 4 rgcd|jj|}|r|j|dyy)Nrrs)rwrrs rer[z%DependencyVisitor.add_iter_dependencys.mm%   ) )#z : rgcN|jduxr|jjSrz)rc logical_deps)rws rerz"DependencyVisitor.use_logical_depss ||4'EDLL,E,EErgc6t||jSrz)rrrwrs rerz#DependencyVisitor.get_type_triggerss d&;&;&=>>rgrz) radict[Expression, Type]rbtuple[int, int]r]zdefaultdict[str, set[str]]rczOptions | NonereturnNone)rrr{r|)rrr{r|)rrr{r|)rrr{r|)rr"r{r|)rmr.r{r|)rrr{r|)rrr{r|)rrr{r|)rr r{r|)rr r{r|)rrr{r|)rrr{bool)rr'r{rL)rr$r{r|)rrr{r|)rr2r{r|)rrr{r|)rr'r{r|)rr!r{r|)rrr{r|)rrrr>r{ str | None)rr)r{r|)rr r{r|)rrr{r|)rr r{r|)rr,r{r|)rrr{r|)rr0r{r|)rr%r{r|)rrr{r|)rstrrHrrIrr{r|)rrrrr{r|)rrJrrr{r|)rrr{r|)rrr{r|)rr(r{r|)rr3r{r|)rr r{r|)r`rr{r|)rrr`r~r{r|)rrLr`r~r{r|)rrLrrr{r|)rrLrrr{ list[str])rrrrr{r|)rrr{r|)r{r}rrLr{r)6__name__ __module__ __qualname__rxrrrrrrrrrrrrrrrrrr r"r$r&r'r1rr4r:r=r?rBrDrFrKrGrrSrYr_rarcrfr|rrrrrr[rr __classcell__)rs@rer\r\sF #' ((/     0'/0#0 )/ TVlO F>#T\l$-L6*M52 ,O G (z .__init__>z .__new__>)rrrcopyrorstrip)rwrrq old_triggersrs revisit_type_typez#TypeTriggersVisitor.visit_type_typesv))#((3$$#==?L' Cs 3l BCs 3k AB Crgcg}|jr$|jt|j|jr*|j |j |j|j r*|j |j |j |jD]"}|j |j |$|Srz)r{ror:rrnrdefaultr)rwrrqrs revisit_type_varz"TypeTriggersVisitor.visit_type_var s << OOL6 7 ?? OOD223??C D ;; OOD223;;? @:: 9C OOD2237 8 9rgcg}|jr$|jt|j|jr*|j |j |j|j r*|j |j |j |j |j |j|Srzr{ror:rrnrrrwrrqs revisit_param_specz$TypeTriggersVisitor.visit_param_spec << OOL6 7 ?? OOD223??C D ;; OOD223;;? @..s?@rgcg}|jr$|jt|j|jr*|j |j |j|j r*|j |j |j |j |j |j|Srzrrs revisit_type_var_tuplez(TypeTriggersVisitor.visit_type_var_tuple#rrgc8|jj|Srz)rr^rxs revisit_unpack_typez%TypeTriggersVisitor.visit_unpack_type.sxxt$$rgclg}|jD]"}|j|j|$|Srz)rrnrrs revisit_parametersz$TypeTriggersVisitor.visit_parameters1s6== 9C OOD2237 8 9rgcg}|jjD]"}|j|j|$|j|j|j|Srz)rrrnrrVrs revisit_typeddict_typez(TypeTriggersVisitor.visit_typeddict_type7sZII$$& :D OOD2248 9 :..s||<=rgc8|j|jSrz)rrVrxs revisit_literal_typez&TypeTriggersVisitor.visit_literal_type>s%%cll33rgcgSrzrrxs revisit_unbound_typez&TypeTriggersVisitor.visit_unbound_typeArrgcgSrzrrxs revisit_uninhabited_typez*TypeTriggersVisitor.visit_uninhabited_typeDrrgclg}|jD]"}|j|j|$|Srzrrs revisit_union_typez$TypeTriggersVisitor.visit_union_typeGrrgrz)rr}rset[TypeAliasType] | Noner{r|r)rrCr{r)rrMr{r)rr>r{r)rrEr{r)rr?r{r)rrFr{r)rrAr{r)rr@r{r)rrIr{r)rrKr{r)rrPr{r)rrRr{r)rrHr{r)rrQr{r)rrWr{r)rrGr{r)rrNr{r)rrDr{r)rrTr{r)rrUr{r)rrVr{r)rrrrxrrrrrrrrrrrrrrrrrrrrrrrrgrerrsPT1 $14M1 1P    ;;   % 4rgrc|jD].\}}|j|tj|0yrz)rrrr)new_depsrrrs remerge_dependenciesrNs8$NN,8 '..w78rgcf|jddDcgc]}|jdk7s|c}Scc}w)Nrzbuiltins.object)rr{)rmrs rerrSs,!XXab\ PTT]]>O-OD PP Ps..c@td|jddDS)Nc38K|]}|jdvyw))builtinstypingenumN) module_name).0rs re z!has_user_bases..Xs_$t'EE_sr)anyr)rms rerrWs# _RVRZRZ[\[]R^_ __rgci}|jD]x\}}|dvsd|jvr||jk(sJt||||}|jD].\}} |j |t j | 0ztj|t|jdD].\}} t|t| D]} td| 0y)zKGenerate dependencies for all interesting modules and print them to stdout.)rrz /typeshed/c |dS)Nrr)xs rez'dump_all_dependencies..ns 1Q4rg)keyz N) rpathr{rfrrrrYadd_all_protocol_depssortedprint) modulesrarbrcall_depsrrrrrr`s redump_all_dependenciesr[s%'HMMO@D ' '<499+D T]]"""hH $  @ GW    / 6 6w ? @@$$X."8>>#3H# gWo #F D/ " ##rg) r`rraryrbrzrcr8r{dict[str, set[str]]) rorrprr`r#raryrbrzr{rrz)rrLrr}rrr{r)rrrrr{r|)rmr.r{zlist[TypeInfo])rmr.r{r}) rzdict[str, MypyFile]raryrbrzrcr8r{r|)p__doc__ __future__r collectionsr mypy.nodesrrrrr r r r r rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3mypy.operatorsr4r5r6r7 mypy.optionsr8 mypy.scoper9mypy.server.triggerr:r;mypy.traverserr< mypy.typeopsr= mypy.typesr>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXmypy.typestaterY mypy.utilrZrfrrr\rlistrrrrrrrrgrersOb##0000000000000b !C+":&-   $ $     %  $   8Q ?(Q ?jRVK K!%K5NKKU+d3i0Up8 Q`# #$#$# #  #rg