
    mi                    Z   d Z ddlmZ ddlmZ ddl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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#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5 ddl6m7Z7m8Z8m9Z9m:Z: ddl;m<Z< ddl=m>Z> ddl?m@Z@mAZA dd	lBmCZC dd
lDmEZE ddlFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^m_Z_m`Z`maZa ddlbmcZc ddldmeZe d7dZfd8dZg G d deC          Zh	 d9d:d(Zi G d) d*e\ejek                            Zld;d.Zmd<d2Znd=d3Zod>d6Zpd S )?a  Generate 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
"<trigger> -> locations"):

  <m.A.g> -> m.f
  <m.A> -> <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 '<m.f>' (this explanation is a bit simplified;
   see below for more details).

The triggers to fire are determined using mypy.server.astdiff.

Examples of triggers:

* '<mod.x>' 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.
* '<mod.Cls.x>' 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).
* '<package.mod>' 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)0GDEFLDEFMDEFSYMBOL_FUNCBASE_TYPESAssertTypeExprAssignmentStmt	AwaitExprBlockCallExprCastExprClassDefComparisonExpr	DecoratorDelStmtDictionaryComprehensionEnumCallExpr
ExpressionForStmtFuncBaseFuncDefGeneratorExprImport	ImportAll
ImportFrom	IndexExpr
MemberExprMypyFileNamedTupleExprNameExprNewTypeExprNodeOperatorAssignmentStmtOpExprOverloadedFuncDefRefExprStarExpr	SuperExpr	TupleExprTypeAliasExprTypeApplicationTypedDictExprTypeFormExprTypeInfoTypeVarExpr	UnaryExprVarWithStmtYieldFromExpr)
op_methodsops_with_inplace_methodreverse_op_methodsunary_op_methods)Options)Scope)make_triggermake_wildcard_trigger)TraverserVisitor)	bind_self)AnyTypeCallableTypeDeletedType
ErasedTypeFunctionLikeInstanceLiteralTypeNoneType
Overloaded
ParametersParamSpecTypePartialType
ProperType	TupleTypeTypeTypeAliasTypeTypedDictType	TypeOfAnyTypeTypeTypeVarTupleTypeTypeVarTypeTypeVisitorUnboundTypeUninhabitedType	UnionType
UnpackTypeget_proper_type)
type_state)correct_relative_importtargetr   type_mapdict[Expression, Type]python_versiontuple[int, int]optionsr9   returndict[str, set[str]]c                h    t          ||| j        |          }|                     |           |j        S )z,Get all dependencies of a node, recursively.)DependencyVisitor
alias_depsacceptmap)r\   r]   r_   ra   visitors        h/var/www/html/bestrading.cuttalo.com/scripts/kaggle-env/lib/python3.11/site-packages/mypy/server/deps.pyget_dependenciesrk      s4      .&:KWUUG
MM';    	module_idstrmodule_treer#   c           	     V   t          |||j                  }|j                            |           5  t	          |t
                    rH|j        D ]?}t	          |t          t          t          t          f          s|                    |           @n~t	          |t                    rT|j        rM|j                            |j                  5  |                    |           ddd           n# 1 swxY w Y   n|                    |           ddd           n# 1 swxY w Y   |j        S )zDGet dependencies of a target -- don't recursive into nested targets.N)re   rf   scopemodule_scope
isinstancer   defsr   r   r   r&   rg   r   infoclass_scoperh   )rm   ro   r\   r]   r_   ri   defns          rj   get_dependencies_of_targetrx      s     .+:PQQG		#	#I	.	. # #fh'' 	#  ) )!$9gGX(YZZ )KK((() )) 	#fk 	# **6;77 ' 'g&&&' ' ' ' ' ' ' ' ' ' ' ' ' ' ' MM'"""# # # # # # # # # # # # # # # ;s6   BD
C, D,C0	0D3C0	4DD Dc                       e Zd Z	 dvdwdZdx fdZdy fdZdz fdZd{ fdZd|dZd}dZ	d~dZ
ddZdd Zd fd"Zd fd$Zdd'Zdd+Zdd.Zd fd0Zd fd2Zd fd4Zd fd6Zdd7Zdd9Zd fd;Zdd?Zd fdAZd fdCZd fdDZd fdFZd fdHZd fdJZd fdLZ d fdNZ!d fdPZ"d fdRZ#d fdTZ$ddYZ%dd[Z&dd]Z'd fd_Z(d fdaZ)d fdcZ*d fdeZ+d fdgZ,ddiZ-dvddkZ.dvddlZ/ddnZ0ddpZ1ddqZ2ddsZ3ddtZ4dduZ5 xZ6S )re   Nr]   r^   r_   r`   rf   defaultdict[str, set[str]]ra   Options | Nonerb   Nonec                    t                      | _        || _        || _        i | _        d| _        d| _        || _        d S )NF)r:   rq   r]   rf   rh   is_classis_package_init_filera   )selfr]   r_   rf   ra   s        rj   __init__zDependencyVisitor.__init__   s@     WW
  %(*$)!rl   or   c                   | j                             |j                  5  |                                | _        |                     | j                                                    |j                                        D ]?\  }}| j        	                    |t                                                    |           @t                                          |           d d d            d S # 1 swxY w Y   d S N)rq   rr   fullnamer   add_type_alias_depscurrent_targetplugin_depsitemsrh   
setdefaultsetupdatesupervisit_mypy_file)r   r   triggertargets	__class__s       rj   r   z!DependencyVisitor.visit_mypy_file   s   Z$$QZ00 	' 	'()(>(>(@(@D%$$TZ%>%>%@%@AAA$%M$7$7$9$9 D D ##GSUU33::7CCCCGG##A&&&	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	's   C C..C25C2r   c                   | j                             |          5  | j                                         }|j        r| j        r/t          |j        t                    rt          |j                  }n|j        }|                     |          D ];}| 	                    |           | 	                    |t          |                     <|j        rft          |j                  D ]Q}|                                 r	|j        dvr2| 	                    t          |j        dz   |j        z                        R|                     | j                                                    t#                                          |           t'          |j                  |hz
  }|D ]8}t          |t*                    r!t#                                          |           9	 d d d            d S # 1 swxY w Y   d S )Nr\   r   __new__.)rq   function_scoper   typer~   rs   rC   r>   get_type_triggersadd_dependencyr;   ru   non_trivial_basesuse_logical_depsnamer   r   r   visit_func_defr   expandedr   )	r   r   r\   	signaturer   basevariantsexr   s	           rj   r   z DependencyVisitor.visit_func_def   s)   Z&&q)) 	/ 	/Z..00Fv N= 'Z%E%E '&/&7&7II !I#55i@@ N NG''000''V8L8L'MMMMv X-af55 X XD  0022 XafD[6[6[++L9Lqv9U,V,VWWW$$TZ%>%>%@%@AAAGG""1%%%1:!,H / /b'** /GG**2.../'	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/s   F<G&&G*-G*r   c                z   |                                  sR|j        j        sE| j                                        ,|                     t          |j        j                             n|j        D ]}d }t          |t                    r|j        r|j        }t          |t                    r2t          |j        t                    r|j        j        r|j        j        }|:|                     t          |          t          |j        j                             t                                          |           d S r   )r   funcis_overloadrq   current_function_namer   r;   r   
decoratorsrs   r'   r   calleer   visit_decorator)r   r   dtnamer   s       rj   r   z!DependencyVisitor.visit_decorator  s$   $$&& 	\ 6% C$**J*J*L*L*T##L$A$ABBB \ \ \$(a)) 'aj 'JEa** .z!(G/L/L .QRQYQb .H-E$''U(;(;\!&/=Z=Z[[["""""rl   r   c                   | j                             |j                  5  | j                                         }|                     t          |          |           | j        }d| _        |j        D ]*}|                     t          |j                  |           +| 	                    |j                   t                                          |           || _        d d d            d S # 1 swxY w Y   d S )NT)rq   rv   ru   current_full_targetr   r;   r~   	type_varsr   process_type_infor   visit_class_def)r   r   r\   old_is_classtvr   s        rj   r   z!DependencyVisitor.visit_class_def0  s)   Z##AF++ 
	) 
	)Z3355FV 4 4f====L DMk G G##L$=$=vFFFF""16***GG##A&&&(DM
	) 
	) 
	) 
	) 
	) 
	) 
	) 
	) 
	) 
	) 
	) 
	) 
	) 
	) 
	) 
	) 
	) 
	)s   B?C--C14C1r"   c                    |j         rT| j                            |j                   5  |                     |j                    d d d            d S # 1 swxY w Y   d S d S r   )ru   rq   rv   r   r   r   s     rj   visit_newtype_exprz$DependencyVisitor.visit_newtype_expr=  s    6 	/''// / /&&qv.../ / / / / / / / / / / / / / / / / /	/ 	/s   AAAru   r/   c           	        | j                                         }|j        D ]}|                     ||           |j        r)|                     |j        t          |                     |j        r)|                     |j        t          |                     |j        r)|                     |j        t          |                     |j        rH|j	        d d         D ]8}| 
                    t          |j                  t          |                     9|                     | j                                                    |j                                        D ]\  }}t#          |j        t&                    r|j        j        r<t+          |          r-| 
                    t          |j        dz   |z                        t-          |          D ]I}| 
                    t          |j        dz   |z             t          |j        dz   |z                        Jt-          |          D ]}|j                                        D ]o\  }}|                                 r||j        vr#|dv r(| 
                    t          |j        dz   |z             t          |j        dz   |z                        p|                                 s| 
                    t          |j        dz             t          |j        dz                        | 
                    t          |j        dz             t          |j        dz                        | 
                    t          |j        dz             t          |j        dz                        | 
                    t          |j        dz                        d S )Nr   r   r   	.__init__.__new__z.(abstract))rq   r   basesadd_type_dependencies
tuple_typer;   typeddict_typedeclared_metaclassis_protocolmror   r<   r   r   r   namesr   rs   noder2   is_initialized_in_classhas_user_basesr   r   )r   ru   r\   r   	base_infor   r   s          rj   r   z#DependencyVisitor.process_type_infoB  s   //11J 	< 	<D&&tF&;;;;? 	U&&t|F?S?S&TTT 	Y&&t':<PVCWCW&XXX" 	]&&t'>|TZG[G[&\\\ 	!Xcrc]  	 ##))*<==lSYFZFZ $     	  !:!:!<!<===***,, 	 	JD$$)S)) 
94 R9M9M R''T]S5H45O(P(PQQQ!24!8!8  I ''$Y%7#%=%DEE+DMC,?$,FGG (     +400 +	V +	VI'o3355  
d((** ! 4:--  666 ## !3c!9D!@AA'(;d(BCC $     ((** V ## !3k!ABB'(CDD $    ## !3j!@AA'
(BCC $    ## !3m!CDD'(CDD $    ##L1Cm1S$T$TUUUW+	V +	Vrl   r   c                    |j         D ]?\  }}|                     t          |          | j                                                   @d S r   )idsr   r;   rq   r   )r   r   idas_ids       rj   visit_importzDependencyVisitor.visit_import  sT     	O 	OIBR 0 0$*2K2K2M2MNNNN	O 	Orl   r   c                V   |                                  rd S t          | j                                        |j        |j        | j                  \  }}|                     t          |                     |j	        D ]-\  }}|                     t          |dz   |z                        .d S Nr   )
r   r[   rq   current_module_idrelativer   r   r   r;   r   )r   r   rm   _r   as_names         rj   visit_import_fromz#DependencyVisitor.visit_import_from  s      "" 	F.J((**AJd>W
 
	1 	L33444W 	F 	FMD'Y_t-C D DEEEE	F 	Frl   r   c                    t          | j                                        |j        |j        | j                  \  }}|                     t          |                     d S r   )r[   rq   r   r   r   r   r   r<   )r   r   rm   r   s       rj   visit_import_allz"DependencyVisitor.visit_import_all  sX    .J((**AJd>W
 
	1
 	1)<<=====rl   r   c                \    |j         s#t                                          |           d S d S r   )is_unreachabler   visit_blockr   r   r   s     rj   r   zDependencyVisitor.visit_block  s6     	#GG"""""	# 	#rl   r
   c                4   |j         }t          |t                    rt          |j        t                    r|j        }|                     |j        t          |j                             |j	        D ]+}|                     |t          |j                             ,t                                          |           nt          |t                    rt          |j        t                    r|j        j        }| j                                         d|j         }|j                                        D ]\  }}|                    d          st          |j        t*                    rr|j        j        }	|	rd|                     |	           |                     |	t          |                     t          | d|           }
|                     |	|
           nbt          |t                    r}t          |j        t.                    rc|j        j        }|j        J | j                                         d|j         }|                     |j        t          |                     nt          |t                    rt          |j        t2                    rp|j        j        j                                        D ]J\  }}t          |j        t*                    r+|j        j        r|                     |j        j                   Kn1|j        r]t7          |j                  dk    sJ |j        d         }t          |t:                    sJ t=          | j                             |                    }	t          |	tB                    rw|	"                                rc|	#                                j        }| $                    t          |dz                        | $                    t          |dz                        t          |tJ                    r?t          |j        tL                    r%|                     |j        j        j'                   n|	r|                     |	           nt                      (                    |           |j        D ]}| )                    |           |j        |gz   }tU          t7          |          dz
            D ]@}||         }||dz            }t          |tV                    r| ,                    |d           A|j        r|                     |j                   | -                                r3|j.        -t          |t                    rt          |j/        t`                    r |j/        j        rd }t          |j/        j        tb                    rH|j/        j                             d	          }|r&t          |j        td                    r|j        j        }n|j/        j        }|sd S |j        D ]w}t          |t`                    rV|j        rO|j3        rH|j4        tj          k    r d S | $                    t          |          t          |j                             nd S d S d S d S d S d S )
Nr   r   r      r   r   r   __iter__r   )6rvaluers   r   analyzedr0   r   upper_boundr;   r   valuesr   visit_call_exprr    ru   rq   r   r   r   r   
startswithr   r2   r   r-   r   r   is_alias_deflenlvaluesr!   rY   r]   getrC   is_type_objtype_objectr   r   r+   r\   visit_assignment_stmtprocess_lvalueranger*   !add_attribute_dependency_for_exprr   unanalyzed_typer   r'   r/   r   
is_new_defkindr   )r   r   r   r   valru   prefixr   symnodetypattr_targetlvalue
class_namer   ifnameinitlvr   s                     rj   r   z'DependencyVisitor.visit_assignment_stmt  s   fh'' 9	3Jv,T,T 9	3H&&$\(:K-L-L '      X X**3|HDU7V7V*WWWWGG##F++++)) 0	3j..Y.Y 0	3?'D
6688FF49FFF!%!1!1!3!3 L Lgs++ L
7<0M0M L!,+C L223777223|F?S?S2TTT&2f3E3Et3E3E&F&F223{2KKKL )) $	3j-.X.X $	3?'D&222
6688FF49FFF&&t':<PVCWCW&XXXX)) 	3j,.W.W 	3!'!5!;!A!A!C!C B BgglC00 BW\5F B..w|/@AAAB ^ 	3qy>>Q&&&&Yq\Ffh/////!$-"3"3F";";<<C#|,, K1B1B K __..7
##Lk1I$J$JKKK##Lj1H$I$IJJJ&),, 0FO]1[1[ 0**6?+?+FGGGG 0**3/// GG))!,,,) , ,##F++++I(E3u::>** O Oqq1ufi00 O::6:NNNv 3**16222  "" 	\q'8'@ 68,,\v}g66\ M*\
 %)fm0(;; 3!=-11*==D 3
496K L L 3 $	 2"M2E F) \ \B!"g.. \2; \2= \7d??"FF++L,?,?bkAZAZ[[[1	\ 	\'@'@
\ \ \ \ \ \\ \rl   r   r   c                   t          |t                    r|                     |j        d           dS t          |t                    r|j        t          t          fv ru|                     |          }| 	                    |          }t          | j                                         d|j                   }|D ]}|                     ||           dS dS t          |t                    r|                     |          rm|j        rf|j        }t          |t&                    rJ|j        }|rAt+          |          r2|                     t          |j        dz   |j        z                        |j        |j        | j        vrdS | j        |j                 }|                     |          }| 	                    |          }|                     ||j                  D ]}|D ]}|                     ||           dS dS t          |t4                    r!|j        D ]}	|                     |	           dS t          |t:                    r|                     |j                   dS dS )z/Generate additional dependencies for an lvalue.__setitem__r   N)rs   r   add_operator_method_dependencyr   r!   r   r   r   get_non_partial_lvalue_typer   r;   rq   r   r   r   r   is_self_member_refr   r   r2   ru   r   r   exprr]   attribute_triggersr*   r   r   r(   )
r   r   lvalue_typetype_triggersattr_triggertype_triggerr   ru   object_typeitems
             rj   r   z DependencyVisitor.process_lvalue	  s   fi(( "	-//]KKKKK))  	-{tTl** #>>vFF $ 6 6{ C C+tz/M/M/O/O,_,_RXR],_,_``$1 D DL''lCCCC +*D D
++ 	-&&v.. ]63D ]{dC(( ]9D ]t 4 4 ]++L9Lv{9Z,[,[\\\{";dm33F"mFK8">>vFF $ 6 6{ C C$($;$;K$U$U H HL(5 H H++L,GGGGH #"H H 	** 	- * *##D))))* *)) 	-,,,,,	- 	-rl   
memberexprr   boolc                    t          |j        t                    sdS |j        j        }t          |t                    o|j        S )z1Does memberexpr to refer to an attribute of self?F)rs   r   r!   r   r2   is_self)r   r  r   s      rj   r   z$DependencyVisitor.is_self_member_ref/  s<    */844 	5#$$$55rl   r'   rM   c                ^   || j         vrt                      S t          | j         |                   }t          |t                    rft          |j        t                    r5|j        j        rt          |j        j                  }n&t                      }n|j        rJ t                      S |S r   )	r]   rV   rY   rs   rJ   r   r2   r   r   )r   r   r  s      rj   r   z-DependencyVisitor.get_non_partial_lvalue_type6  s    &&"$$$%dmF&;<<k;// 	)&+s++ );# 4"1&+2B"C"CKK"1"3"3KK ",,,,&(((rl   r$   c                H   t                                          |           |                     |j                   t          |j                 }|                     |j        |           |j        t          v r*d|dd          z   }|                     |j        |           d S d S )N__i   )r   visit_operator_assignment_stmtr   r   r5   opr   r6   )r   r   methodinplace_methodr   s       rj   r  z0DependencyVisitor.visit_operator_assignment_stmtK  s    ..q111AH%%%AD!..qx@@@4***"VABBZ/N2218^LLLLL +*rl   r   c                   t                                          |           |j        sY|                     |j        d           |                     |j        d           |j        r|                     |j        d           n=|                     |j        d           |j        r|                     |j        d           |                     |j                   t          |j        t                    r5|j        }|r,|                     |d           |                     |d           |j        r|                     |j                   d S d S )Nr   __getitem____next__	__aiter__	__anext__)r   visit_for_stmtis_asyncr   r   inferred_iterator_typeadd_attribute_dependencyr   indexrs   r*   inferred_item_type
index_typer   )r   r   	item_typer   s      rj   r  z DependencyVisitor.visit_for_stmtT  sS   q!!!z 
	U 2216:FFF2216=III' T--a.F
SSS2216;GGG' U--a.FTTTAG$$$agy)) 	H,I H--iDDD--iGGG< 	5&&q|44444	5 	5rl   r3   c                \   t                                          |           |j        D ]b}|j        s-|                     |d           |                     |d           6|                     |d           |                     |d           c|j        D ]}|                     |           d S )N	__enter____exit__
__aenter__	__aexit__)r   visit_with_stmtr   r  r   analyzed_typesr   )r   r   er   r   s       rj   r%  z!DependencyVisitor.visit_with_stmtm  s    """ 	G 	GA: G66q+FFF66q*EEEE66q,GGG66q+FFFF# 	, 	,C&&s++++	, 	,rl   r   c                    t                                          |           t          |j        t                    r"|                     |j        j        d           d S d S )N__delitem__)r   visit_del_stmtrs   r   r   r   r   r   s     rj   r*  z DependencyVisitor.visit_del_stmty  s\    q!!!afi(( 	O2216;NNNNN	O 	Orl   c                   |j         r'|                     t          |j                              t          | j                            |                    }t          |t                    ry|                                rg|	                                j         }|                     t          |dz                        |                     t          |dz                        d S d S d S )Nr   r   )
r   r   r;   rY   r]   r   rs   rC   r   r   )r   r   r   r   s       rj   process_global_ref_exprz)DependencyVisitor.process_global_ref_expr  s    : 	:QZ 8 8999 dm//2233c<(( 	GS__->-> 	G**3JZ+-E F FGGGZ*-D E EFFFFF	G 	G 	G 	Grl   r!   c                x    |j         t          k    rd S |j         t          k    rd S |                     |           d S r   )r   r   r   r,  r   s     rj   visit_name_exprz!DependencyVisitor.visit_name_expr  s@    6T>> F6T>> F$$Q'''''rl   r'  c                   t          |j        t                    rQt          |j        j        t                    r2|                     t          |j        j        j                             n!t                      	                    |           |j
        |                     |           d S |j        | j        vrd S t          |j        t                    r]t          |j        j        t                    r>|                     t          |j        j        j        dz   |j        z                        d S t          | j        |j                           }|                     ||j                   |                                 rQt          |t$                    r>|                     ||          }|(|                     t          |                     d S d S d S d S r   )rs   r   r'   r   r/   r   r;   r   r   visit_member_exprr   r,  r]   r   r   rY   r  r   r?   get_unimported_fullname)r   r'  r   r   r   s       rj   r0  z#DependencyVisitor.visit_member_expr  s   afg&& 	):afk8+L+L 	)QV[-A B BCCCCGG%%a(((6((+++++ vT]** !&'** z!&+x/P/P ##L1E1Kaf1T$U$UVVV!$-"788C))#qv666$$&& 
<:c7+C+C 
<33As;;# ''T(:(:;;;;;
< 
< 
< 
<##rl   r   r?   
str | Nonec                   d}|j         t          j        k    rt          |j        t
                    rd|j        z   |z   }|j        }|j        | j        vrdS t          | j        |j                           }t          |t                    sdS |}|j         t          j        k    rt          |j        t
                    |j         t          j
        k    r|j        r|j        dz   |j        z   |z   S dS )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.
         r   N)type_of_anyrP   from_another_anyrs   r   r   r   r]   rY   r?   from_unimported_typemissing_import_name)r   r'  r   suffixobj_types        rj   r1  z)DependencyVisitor.get_unimported_fullname  s     
 o!;;;
16S]@^@^;16\F*FAvT]**t&t}QV'<==Hh00 tC o!;;;
16S]@^@^; ?i<<<AX<*S0169FBBtrl   r)   c                2   |                                  s!t                                          |           |j        W|j        }t          |j                  D ]=}|                     t          |j        dz   |z                        ||j	        v r d S <d S d S r   )
r   r   visit_super_exprru   r   r   r   r;   r   r   )r   r'  r   r   r   s       rj   r<  z"DependencyVisitor.visit_super_expr  s    $$&& 	(GG$$Q'''66D)!&11  ##L1Dt1K$L$LMMM4:%% EE	 &	  rl   r   c                   t          |j        t                    r'|j        j        dk    r|                     |           d S t                                          |           | j                            |j                  }|<t          |          }t          |t                    s|                     |d           d S d S d S )Nzbuiltins.isinstance__call__)rs   r   r'   r   process_isinstance_callr   r   r]   r   rY   rC   r  r   r'  r   r   s      rj   r   z!DependencyVisitor.visit_call_expr  s    ah(( 	CQX->BW-W-W((+++++GG##A&&&-##AH--C%c**!#|44 C11#zBBBBB C Crl   c                r   t          |j                  dk    r||j        d         }t          |t                    rZ|j        t
          k    rJt          |j        t                    r0|j        r)| 	                    t          |j                             dS t                                          |           dS )zDProcess "isinstance(...)" in a way to avoid some extra dependencies.r  r   N)r   argsrs   r'   r   r   r   r/   r   r   r;   r   r   )r   r'  argr   s      rj   r?  z)DependencyVisitor.process_isinstance_call  s    qv;;!&)C3((H$$sx22 %L %
 ##L$>$>??? 	"""""rl   r   c                ~    t                                          |           |                     |j                   d S r   )r   visit_cast_exprr   r   r   r'  r   s     rj   rE  z!DependencyVisitor.visit_cast_expr  s7    """""16*****rl   r.   c                ~    t                                          |           |                     |j                   d S r   )r   visit_type_form_exprr   r   rF  s     rj   rH  z&DependencyVisitor.visit_type_form_expr  s7    $$Q'''""16*****rl   r	   c                ~    t                                          |           |                     |j                   d S r   )r   visit_assert_type_exprr   r   rF  s     rj   rJ  z(DependencyVisitor.visit_assert_type_expr  s7    &&q)))""16*****rl   r,   c                    t                                          |           |j        D ]}|                     |           d S r   )r   visit_type_applicationtypesr   r@  s      rj   rL  z(DependencyVisitor.visit_type_application
  sM    &&q)))7 	, 	,C&&s++++	, 	,rl   r   c                    t                                          |           |                     |j        d           d S )Nr  )r   visit_index_exprr   r   rF  s     rj   rO  z"DependencyVisitor.visit_index_expr  s9      ###++AFMBBBBBrl   r1   c                    t                                          |           |j        t          vrd S t          |j                 }|                     |j        |           d S r   )r   visit_unary_exprr  r8   r   r   )r   r'  r  r   s      rj   rQ  z"DependencyVisitor.visit_unary_expr  sX      ###4'''F!!$'++AFF;;;;;rl   r%   c                    t                                          |           |                     |j        |j        |j                   d S r   )r   visit_op_exprprocess_binary_opr  leftrightrF  s     rj   rS  zDependencyVisitor.visit_op_expr  s?    a   qtQVQW55555rl   r   c                    t                                          |           t          |j                  D ]9\  }}|j        |         }|j        |dz            }|                     |||           :d S )Nr   )r   visit_comparison_expr	enumerate	operatorsoperandsrT  )r   r'  r   r  rU  rV  r   s         rj   rX  z'DependencyVisitor.visit_comparison_expr  sx    %%a(((q{++ 	4 	4EAr:a=DJq1u%E""2tU3333	4 	4rl   r  rn   rU  rV  c                    t          j        |          }|rb|dk    r|                     ||           d S |                     ||           t          j        |          }|r|                     ||           d S d S d S )Nin)r5   r   r   r7   )r   r  rU  rV  r  
rev_methods         rj   rT  z#DependencyVisitor.process_binary_op%  s    ## 	KTzz33E6BBBBB33D&AAA/3F;;
 K77zJJJJJ	K 	KK Krl   r  c                    t          | j                            |                    }||                     ||           d S d S r   )rY   r]   r   'add_operator_method_dependency_for_type)r   r'  r  r   s       rj   r   z0DependencyVisitor.add_operator_method_dependency0  sG    dm//2233?88fEEEEE ?rl   rK   c                   t          |t                    rt          |j                  }t          |t                    r|j        }t          |t                    r6t          |j        j	        dz   |z             }| 
                    |           d S t          |t                    r/|j        D ]%}|                     t          |          |           &d S t          |t                    r1|                                r|                     |j        |           d S t          |t"                    rRt          |j        t                    r:|j        j        j        +|                     |j        j        j        |           d S d S d S d S r   )rs   rS   rY   r   rL   partial_fallbackrD   r;   r   r   r   rW   r   r`  rC   r   fallbackrQ   r  metaclass_type)r   r   r  r   r  s        rj   r`  z9DependencyVisitor.add_operator_method_dependency_for_type5  s    c;'' 	3!#/22Cc9%% 	'&Cc8$$ 
	c"38#4s#:V#CDDG(((((Y'' 	c	 \ \<<_T=R=RTZ[[[[\ \\** 	cs/@/@ 	c88vNNNNNX&& 	c#(H-- c#(-2N2Z<<SX]=Y[abbbbb	c 	cc c2Z2Zrl   r   c                    t                                          |           |j        D ]}|                     |           d S r   )r   visit_generator_expr	sequencesadd_iter_dependencyr   r'  seqr   s      rj   rf  z&DependencyVisitor.visit_generator_exprH  sM    $$Q'''; 	* 	*C$$S))))	* 	*rl   r   c                    t                                          |           |j        D ]}|                     |           d S r   )r   visit_dictionary_comprehensionrg  rh  ri  s      rj   rl  z0DependencyVisitor.visit_dictionary_comprehensionM  sM    ..q111; 	* 	*C$$S))))	* 	*rl   r(   c                ~    t                                          |           |                     |j                   d S r   )r   visit_star_exprrh  r   rF  s     rj   rn  z!DependencyVisitor.visit_star_exprR  s7    """  (((((rl   r4   c                ~    t                                          |           |                     |j                   d S r   )r   visit_yield_from_exprrh  r   rF  s     rj   rp  z'DependencyVisitor.visit_yield_from_exprV  s7    %%a(((  (((((rl   r   c                    t                                          |           |                     |j        d           d S )N	__await__)r   visit_await_exprr   r   rF  s     rj   rs  z"DependencyVisitor.visit_await_exprZ  s9      ###..qv{CCCCCrl   r\   c                    || j         v r2| j         |         D ]&}|                     t          |                     %d S d S r   )rf   r   r;   )r   r\   aliass      rj   r   z%DependencyVisitor.add_type_alias_deps`  sX     T_$$0 9 9##L$7$78888 %$9 9rl   r   c                    |                     d          rdS || j                                        }| j                            |t                                                    |           dS )zyAdd dependency from trigger to a target.

        If the target is not given explicitly, use the current target.
        )z
<builtins.z<typing.z<mypy_extensions.z<typing_extensions.N)r   rq   r   rh   r   r   add)r   r   r\   s      rj   r   z DependencyVisitor.add_dependencyg  sn    
 R
 
 	 F>Z..00FGSUU++//77777rl   c                b    |                      |          D ]}|                     ||           dS )zAdd dependencies to all components of a type.

        Args:
            target: If not None, override the default (current) target of the
                generated dependency.
        N)r   r   )r   r   r\   r   s       rj   r   z'DependencyVisitor.add_type_dependenciesx  sD     --c22 	1 	1G0000	1 	1rl   r   c                f    |                      ||          }|D ]}|                     |           dS )z;Add dependencies for accessing a named attribute of a type.N)r   r   )r   r   r   r   r\   s        rj   r  z*DependencyVisitor.add_attribute_dependency  sG    ))#t44 	( 	(F''''	( 	(rl   	list[str]c                   t          |          }t          |t                    rt          |j                  }t          |t                    r|j        }t          |t                    r!|j        j         d| }t          |          gS t          |t                    rr|                                r^|                                j         d| }t          |          g}|                    |                     |j        |                     |S t          |t                     r7g }|j        D ]+}|                    |                     ||                     ,|S t          |t$                    r|                     |j        |          }t          |j        t                    rQ|j        j        j        @|                    t          |j        j        j        j        j         d|                      |S g S )z<Return all triggers associated with the attribute of a type.r   )rY   rs   rS   r   rL   rb  rD   r   r   r;   rC   r   r   extendr   rc  rW   r   rQ   r  rd  append)r   r   r   membertriggersr   r  s          rj   r   z$DependencyVisitor.attribute_triggers  s   c""c;'' 	3!#/22Cc9%% 	'&Cc8$$ 	)22D22F (())\** 	s/@/@ 	))2;;T;;F$V,,-HOOD33CL$GGHHHOY'' 	G	 D Dt66tTBBCCCCNX&& 	..sx>>H#(H-- #(-2N2Z CHM$@$E$N!W!WQU!W!WXX   OIrl   c                n    | j                             |          }||                     ||           d S d S r   r]   r   r  )r   r'  r   r   s       rj   r   z3DependencyVisitor.add_attribute_dependency_for_expr  s?    m""?))#t44444 ?rl   r   c                n    | j                             |          }|r|                     |d           d S d S )Nr   r  )r   r   r   s      rj   rh  z%DependencyVisitor.add_iter_dependency  sE    m%% 	;))#z:::::	; 	;rl   c                ,    | j         d uo| j         j        S r   )ra   logical_deps)r   s    rj   r   z"DependencyVisitor.use_logical_deps  s    |4'EDL,EErl   c                F    t          ||                                           S r   )r   r   r   r   s     rj   r   z#DependencyVisitor.get_type_triggers  s     d&;&;&=&=>>>rl   r   )
r]   r^   r_   r`   rf   rz   ra   r{   rb   r|   )r   r   rb   r|   )r   r   rb   r|   )r   r   rb   r|   )r   r   rb   r|   )r   r"   rb   r|   )ru   r/   rb   r|   )r   r   rb   r|   )r   r   rb   r|   )r   r   rb   r|   )r   r   rb   r|   )r   r
   rb   r|   )r   r   rb   r|   )r  r   rb   r  )r   r'   rb   rM   )r   r$   rb   r|   )r   r   rb   r|   )r   r3   rb   r|   )r   r   rb   r|   )r   r'   rb   r|   )r   r!   rb   r|   )r'  r   rb   r|   )r'  r   r   r?   rb   r2  )r'  r)   rb   r|   )r'  r   rb   r|   )r'  r   rb   r|   )r'  r.   rb   r|   )r'  r	   rb   r|   )r'  r,   rb   r|   )r'  r   rb   r|   )r'  r1   rb   r|   )r'  r%   rb   r|   )r'  r   rb   r|   )r  rn   rU  r   rV  r   rb   r|   )r'  r   r  rn   rb   r|   )r   rK   r  rn   rb   r|   )r'  r   rb   r|   )r'  r   rb   r|   )r'  r(   rb   r|   )r'  r4   rb   r|   )r'  r   rb   r|   )r\   rn   rb   r|   )r   rn   r\   r2  rb   r|   )r   rM   r\   r2  rb   r|   )r   rM   r   rn   rb   r|   )r   rM   r   rn   rb   rz  )r'  r   r   rn   rb   r|   )r   r   rb   r|   )rb   r  r   rM   rb   rz  )7__name__
__module____qualname__r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r%  r*  r,  r.  r0  r1  r<  r   r?  rE  rH  rJ  rL  rO  rQ  rS  rX  rT  r   r`  rf  rl  rn  rp  rs  r   r   r   r  r   r   rh  r   r   __classcell__)r   s   @rj   re   re      s        #'    6' ' ' ' ' '/ / / / / /0# # # # # #0) ) ) ) ) )/ / / /
TV TV TV TVlO O O O	F 	F 	F 	F> > > ># # # # # #T\ T\ T\ T\ T\ T\l$- $- $- $-L6 6 6 6   *M M M M M M5 5 5 5 5 52
, 
, 
, 
, 
, 
,O O O O O OG G G G	( 	( 	( 	(< < < < < <B   4     	C 	C 	C 	C 	C 	C# # # # # #"+ + + + + ++ + + + + ++ + + + + +, , , , , ,
C C C C C C< < < < < <6 6 6 6 6 64 4 4 4 4 4	K 	K 	K 	KF F F F
c c c c&* * * * * *
* * * * * *
) ) ) ) ) )) ) ) ) ) )D D D D D D9 9 9 98 8 8 8 8"1 1 1 1 1( ( ( (   <5 5 5 5
; ; ; ;
F F F F? ? ? ? ? ? ? ?rl   re   Nr   rM   r   r  seen_aliasesset[TypeAliasType] | Nonerz  c                H    |                      t          ||                    S )z=Return all triggers that correspond to a type becoming stale.)rg   TypeTriggersVisitor)r   r   r  s      rj   r   r     s"     ::)*:LIIJJJrl   c                      e Zd Z	 d8d9dZd:dZd;dZd<dZd=dZd>dZd?dZ	d@dZ
dAdZdBdZdCdZdDd!ZdEd#ZdFd%ZdGd'ZdHd)ZdId+ZdJd-ZdKd/ZdLd1ZdMd3ZdNd5ZdOd7ZdS )Pr  Nr   r  r  r  rb   r|   c                L    g | _         |pt                      | _        || _        d S r   )depsr   r  r   )r   r   r  s      rj   r   zTypeTriggersVisitor.__init__  s*      "	0<0E 0rl   r   rM   rz  c                8    t          || j        | j                  S r   )r   r   r  r  s     rj   r   z%TypeTriggersVisitor.get_type_triggers  s     d&;T=NOOOrl   rD   c                   t          |j        j                  }|g}|j        D ]*}|                    |                     |                     +|j        r-|                    |                     |j                             |j        r8|j        j        r,|	                    t          |j        j                             |S r   )r;   r   r   rB  r|  r   last_known_valueextra_attrsmod_namer}  r<   r   r   r   r  rC  s        rj   visit_instancez"TypeTriggersVisitor.visit_instance  s    sx01198 	9 	9COOD223778888 	JOOD2233GHHIII? 	Ms7 	MOO1#/2JKKLLLrl   rN   c                b   || j         v rg S | j                             |           |j        J t          |j        j                  }|g}|j        D ]*}|                    |                     |                     +|                    |                     |j        j                             |S r   )	r  rw  ru  r;   r   rB  r|  r   r\   r  s        rj   visit_type_alias_typez)TypeTriggersVisitor.visit_type_alias_type  s    $###Ic"""y$$$sy12298 	9 	9COOD223778888..sy/?@@AAArl   r?   c                >    |j         t          |j                   gS g S r   )r8  r;   r  s     rj   	visit_anyzTypeTriggersVisitor.visit_any  s$    ". !899::	rl   rF   c                    g S r    r  s     rj   visit_none_typez#TypeTriggersVisitor.visit_none_type      	rl   r@   c                    g }|j         D ]*}|                    |                     |                     +|                    |                     |j                             |S r   )	arg_typesr|  r   ret_typer   r   r  rC  s       rj   visit_callable_typez'TypeTriggersVisitor.visit_callable_type  sd    = 	9 	9COOD223778888..s|<<=== rl   rG   c                n    g }|j         D ]*}|                    |                     |                     +|S r   r   r|  r   r   r   r  r  s       rj   visit_overloadedz$TypeTriggersVisitor.visit_overloaded  @    I 	: 	:DOOD224889999rl   trB   c                    J d            )NFz"Should not see an erased type herer  )r   r  s     rj   visit_erased_typez%TypeTriggersVisitor.visit_erased_type  s    :::::rl   rA   c                    g S r   r  r  s     rj   visit_deleted_typez&TypeTriggersVisitor.visit_deleted_type  r  rl   rJ   c                    J d            )NFz"Should not see a partial type herer  r  s     rj   visit_partial_typez&TypeTriggersVisitor.visit_partial_type  s    :::::rl   rL   c                    g }|j         D ]*}|                    |                     |                     +|                    |                     |j                             |S r   )r   r|  r   rb  r  s       rj   visit_tuple_typez$TypeTriggersVisitor.visit_tuple_type  sc    I 	: 	:DOOD224889999..s/CDDEEErl   rQ   c                &   |                      |j                  }| j        so|                                }|D ]X}|                    |                    d          dz              |                    |                    d          dz              Y|S )N>z
.__init__>z	.__new__>)r   r  r   copyr}  rstrip)r   r   r  old_triggersr   s        rj   visit_type_typez#TypeTriggersVisitor.visit_type_type	  s    ))#(33$ 	C#==??L' C Cs 3 3l BCCCs 3 3k ABBBBrl   rS   c                ~   g }|j         r'|                    t          |j                              |                    |                     |j                             |                    |                     |j                             |j        D ]*}|                    |                     |                     +|S r   )r   r}  r;   r|  r   r   defaultr   )r   r   r  r   s       rj   visit_type_varz"TypeTriggersVisitor.visit_type_var  s    < 	8OOL66777..s??@@@..s{;;<<<: 	9 	9COOD223778888rl   rI   c                t   g }|j         r'|                    t          |j                              |                    |                     |j                             |                    |                     |j                             |                    |                     |j                             |S r   )r   r}  r;   r|  r   r   r  r   r   r   r  s      rj   visit_param_specz$TypeTriggersVisitor.visit_param_spec  s    < 	8OOL66777..s??@@@..s{;;<<<..sz::;;;rl   rR   c                   g }|j         r'|                    t          |j                              |                    |                     |j                             |                    |                     |j                             |S r   )r   r}  r;   r|  r   r   r  r  s      rj   visit_type_var_tuplez(TypeTriggersVisitor.visit_type_var_tuple%  sv    < 	8OOL66777..s??@@@..s{;;<<<rl   rX   c                6    |j                             |           S r   )r   rg   r  s     rj   visit_unpack_typez%TypeTriggersVisitor.visit_unpack_type-  s    xt$$$rl   rH   c                n    g }|j         D ]*}|                    |                     |                     +|S r   )r  r|  r   r  s       rj   visit_parametersz$TypeTriggersVisitor.visit_parameters0  s@    = 	9 	9COOD223778888rl   rO   c                    g }|j                                         D ]*}|                    |                     |                     +|                    |                     |j                             |S r   )r   r   r|  r   rc  r  s       rj   visit_typeddict_typez(TypeTriggersVisitor.visit_typeddict_type6  sn    I$$&& 	: 	:DOOD224889999..s|<<===rl   rE   c                6    |                      |j                  S r   )r   rc  r  s     rj   visit_literal_typez&TypeTriggersVisitor.visit_literal_type=  s    %%cl333rl   rU   c                    g S r   r  r  s     rj   visit_unbound_typez&TypeTriggersVisitor.visit_unbound_type@  r  rl   rV   c                    g S r   r  r  s     rj   visit_uninhabited_typez*TypeTriggersVisitor.visit_uninhabited_typeC  r  rl   rW   c                n    g }|j         D ]*}|                    |                     |                     +|S r   r  r  s       rj   visit_union_typez$TypeTriggersVisitor.visit_union_typeF  r  rl   r   )r   r  r  r  rb   r|   r  )r   rD   rb   rz  )r   rN   rb   rz  )r   r?   rb   rz  )r   rF   rb   rz  )r   r@   rb   rz  )r   rG   rb   rz  )r  rB   rb   rz  )r   rA   rb   rz  )r   rJ   rb   rz  )r   rL   rb   rz  )r   rQ   rb   rz  )r   rS   rb   rz  )r   rI   rb   rz  )r   rR   rb   rz  )r   rX   rb   rz  )r   rH   rb   rz  )r   rO   rb   rz  )r   rE   rb   rz  )r   rU   rb   rz  )r   rV   rb   rz  )r   rW   rb   rz  )r  r  r  r   r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rl   rj   r  r    s       PT1 1 1 1 1P P P P
 
 
 

 
 
 
   
         ; ; ; ;   ; ; ; ;               % % % %      4 4 4 4           rl   r  new_depsr  r|   c                    |                                  D ]:\  }}|                    |t                                                    |           ;d S r   )r   r   r   r   )r  r  r   r   s       rj   merge_dependenciesr  M  sS    $NN,, 8 8''..w77778 8rl   ru   r/   list[TypeInfo]c                4    d | j         dd          D             S )Nc                (    g | ]}|j         d k    |S )zbuiltins.object)r   .0r   s     rj   
<listcomp>z%non_trivial_bases.<locals>.<listcomp>S  s%    PPPTT]>O-O-OD-O-O-Orl   r   )r   ru   s    rj   r   r   R  s     PPTXabb\PPPPrl   c                N    t          d | j        dd          D                       S )Nc              3  (   K   | ]}|j         d vV  dS ))builtinstypingenumN)module_namer  s     rj   	<genexpr>z!has_user_bases.<locals>.<genexpr>W  s+      __$t'EE______rl   r   )anyr   r  s    rj   r   r   V  s/    __RVRZ[\[][]R^______rl   modulesdict[str, MypyFile]c                   i }|                                  D ]\  }}|dv s	d|j        v r||j        k    sJ t          ||||          }|                                 D ]:\  }}	|                    |t                                                    |	           ;t          j        |           t          |                                 d           D ]8\  }}	t          |           t          |	          D ]}
t          d|
            9dS )zKGenerate dependencies for all interesting modules and print them to stdout.)r  r  z
/typeshed/c                    | d         S )Nr   r  )xs    rj   <lambda>z'dump_all_dependencies.<locals>.<lambda>m  s
    1Q4 rl   )keyz    N)r   pathr   rk   r   r   r   rZ   add_all_protocol_depssortedprint)r  r]   r_   ra   all_depsr   r   r  r   r   r\   s              rj   dump_all_dependenciesr  Z  s<    %'HMMOO @ @D '''<49+D+DT]""""hHH $

 	@ 	@GW//66w????	@$X..."8>>#3#3HHH # #gWoo 	# 	#F///""""	## #rl   )
r\   r   r]   r^   r_   r`   ra   r9   rb   rc   )rm   rn   ro   r   r\   r#   r]   r^   r_   r`   rb   rc   r   )r   rM   r   r  r  r  rb   rz  )r  rc   r  rc   rb   r|   )ru   r/   rb   r  )ru   r/   rb   r  )
r  r  r]   r^   r_   r`   ra   r9   rb   r|   )q__doc__
__future__r   collectionsr   
mypy.nodesr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   mypy.operatorsr5   r6   r7   r8   mypy.optionsr9   
mypy.scoper:   mypy.server.triggerr;   r<   mypy.traverserr=   mypy.typeopsr>   
mypy.typesr?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   mypy.typestaterZ   	mypy.utilr[   rk   rx   re   r   listrn   r  r  r   r   r  r  rl   rj   <module>r     s2  O Ob # " " " " " # # # # # #1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1d            !                 C C C C C C C C + + + + + + " " " " " "                                                         : & % % % % % - - - - - -	 	 	 	   8X? X? X? X? X?( X? X? X?x RVK K K K KL L L L L+d3i0 L L L^8 8 8 8
Q Q Q Q` ` ` `# # # # # #rl   