+
    BiE                        R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	 ^ RI
t
^ RIt^ RIHtHtHtHtHt ^ RI
HtHtHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt R t ! R R4      t ! R R]P@                  4      t! ! R R]P@                  4      t" ! R R]P@                  4      t# ! R R]P@                  4      t$ ! R R]P@                  4      t% ! R R]P@                  4      t& ! R R]P@                  4      t' ! R R]P@                  4      t( ! R R]P@                  4      t) ! R  R!4      t*]+t,R" ! 4       t- ! R# R$]P@                  4      t. ! R% R&]P@                  4      t/R# )'z!Tests for the annotations module.N)Template)Format
ForwardRefget_annotationsannotations_to_string	type_repr)Unpackget_type_hintsListUnion)support)import_helper)inspect_stock_annotations)inspect_stringized_annotations) inspect_stringized_annotations_2)%inspect_stringized_annotations_pep695c                 F   a  \         P                  ! S 4      V 3R  l4       pV# )c                 2   < S! V ^,          V^,          4      # )    )abfns   &&./usr/lib/python3.14/test/test_annotationlib.pywrappertimes_three.<locals>.wrapper   s    !a%Q    )	functoolswraps)r   r   s   f r   times_threer      s%    __R    Nr   c                   &   a  ] tR t^&t o R tRtV tR# )MyClassc                    R # )my reprr   selfs   &r   __repr__MyClass.__repr__'   s    r   r   N)__name__
__module____qualname____firstlineno__r&   __static_attributes____classdictcell____classdict__s   @r   r!   r!   &   s      r   r!   c                   &   a  ] tR t^+t o R tRtV tR# )
TestFormatc                V   V P                  \        P                  P                  ^4       V P                  \        P                  ^4       V P                  \        P                  P                  ^4       V P                  \        P                  ^4       V P                  \        P
                  P                  ^4       V P                  \        P
                  ^4       V P                  \        P                  P                  ^4       V P                  \        P                  ^4       R#    N)assertEqualr   VALUEvalueVALUE_WITH_FAKE_GLOBALS
FORWARDREFSTRINGr$   s   &r   	test_enumTestFormat.test_enum,   s    ++Q/q)77==qA77;**00!4**A.,,a0*r   r   N)r(   r)   r*   r+   r;   r,   r-   r.   s   @r   r1   r1   +   s     + +r   r1   c                   8   a  ] tR t^:t o R tR tR tR tRtV t	R# )TestForwardRefFormatc                  a V3R  lR lp\        V\        P                  R7      pVR,          pV P                  V\        4       V P                  VP                  R4       V P                  \        4      ;_uu_ 4        VP                  4        RRR4       ^oV P                  VP                  4       S4       \        V\        P                  R7      pV P                  VR,          S4       R#   + '       g   i     Lh; i)c                   < V ^8  d   QhRS/#    argr   )formatxs   "r   __annotate__7TestForwardRefFormat.test_closure.<locals>.__annotate__<        	 	q 	r   c                     R # Nr   rC   s   &r   inner0TestForwardRefFormat.test_closure.<locals>.inner<       r   rD   rC   rE   N)
r   r   r9   assertIsInstancer   r5   __forward_arg__assertRaises	NameErrorevaluate)r%   rL   annofwdrefrE   s   &   @r   test_closure!TestForwardRefFormat.test_closure;   s    	 	 uV->->?efj1//5y))OO * *A.uV->->?ea( *)s   >C//C?	c                   R  R lp\        V\        P                  R7      pV P                  VR,          \        4       VR,          pV P                  V\        4       V P                  VP                  R4       V P                  \        4      ;_uu_ 4        VP                  4        RRR4       V P                  VP                  R^/R7      ^4       R#   + '       g   i     L6; i)c                0    V ^8  d   QhR\         R\        /# rB   rE   yintdoesntexist)rD   s   "r   rF   8TestForwardRefFormat.test_function.<locals>.__annotate__M        	 	 	 	r   c                     R # rJ   r   rE   r\   s   &&r   f-TestForwardRefFormat.test_function.<locals>.fM   rN   r   rO   rE   r\   r_   Nglobals)r   r   r9   assertIsr^   rP   r   r5   rQ   rR   rS   rT   r%   rd   rU   rV   s   &   r   test_function"TestForwardRefFormat.test_functionL   s    	 q):):;d3i%cfj1//?y))OO *-1CDaH *)s   CC&	c                   R  R lp\        V\        P                  R7      pVR,          pV P                  V\        4       V P                  V\        P                  ! RVR7      4       VR,          pV P                  V\        4       V P                  V\        P                  ! RVR7      4       VR,          pV P                  V\        4       V P                  V\        P                  ! R	VR7      4       VR
,          pV P                  V\        4       V P                  V\        P                  ! RVR7      4       VR,          pV P                  V\        4       V P                  V\        P                  ! RVR7      4       VR,          pV P                  V\        4       V P                  V\        P                  ! RVR7      4       R# )c                    V ^8  d   QhR\         P                  R\         \        ,          R\        \        4      R\         \        ,          R\         5R\         \        8  /# )rB   rE   r\   zalphabetagamma)somemoduleobj)rD   s   "r   rF   ETestForwardRefFormat.test_nonexistent_attribute.<locals>.__annotate__Z   sZ     	 	{{	F|	 F|	 #:		
 %	 #:	r   c                     R # rJ   r   )rE   r\   rn   ro   rp   rq   s   &&&&&&r   rd   :TestForwardRefFormat.test_nonexistent_attribute.<locals>.fZ   s     r   rO   rE   zsome.moduleownerr\   zsome[module]rn   zsome(module)ro   z
some | objrp   z+somerq   z
some < objN)r   r   r9   rP   r   r5   r   EqualToForwardRef)	r%   rd   rU   x_annoy_annoz_anno
alpha_anno	beta_anno
gamma_annos	   &        r   test_nonexistent_attribute/TestForwardRefFormat.test_nonexistent_attributeY   sd   	 q):):;cfj1!:!:=PQ!RScfj1!:!:>QR!STcfj1!:!:>QR!ST']
j*5W%>%>|ST%UVL	i4G$=$=gQ$OP']
j*5W%>%>|ST%UVr   c           	         ! R  R4      p\        V\        P                  R7      pVR,          pV P                  V\        4       V P                  VP                  R\        /R7      \        \        ,          4       VR,          pV P                  V\        4       \        P                  ! V4      w  rVV P                  V\        4       V P                  V\        P                  ! RRVR7      4       R	# )
c                   ,   a  ] tR t^t o V 3R ltRtV tR# )OTestForwardRefFormat.test_partially_nonexistent_union.<locals>.UnionForwardrefsc                X   < V ^8  d   Qh/ S[ S[,          ;R&   S[S[ S[3,          ;R&   # )rB   pipeunion)str	undefinedr   )rD   r/   s   "r   rF   \TestForwardRefFormat.test_partially_nonexistent_union.<locals>.UnionForwardrefs.__annotate__   s(     	/! i(( r   r   Nr(   r)   r*   r+   __annotate_func__r,   r-   r.   s   @r   UnionForwardrefsr            r   r   rO   r   r   rf   r   Tis_classry   N)r   r   r9   rP   r   r5   rT   r^   r   r   typingget_argsrh   r   rz   )r%   r   annosr   r   arg1arg2s   &      r    test_partially_nonexistent_union5TestForwardRefFormat.test_partially_nonexistent_union}   s    	) 	)   09J9JKV}dJ/MM;"4M5#I	
 geU+__U+
dC '++K$N^_	
r   r   N)
r(   r)   r*   r+   rW   rj   r   r   r,   r-   r.   s   @r   r>   r>   :   s!     )"I"WH
 
r   r>   c                   n   a  ] tR t^t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tRtV tR# )TestStringFormatc                |   a ^ oV3R lR lp\        V\        P                  R7      pV P                  VRR/4       R# )    c                   < V ^8  d   QhRS/# rA   r   )rD   rE   s   "r   rF   3TestStringFormat.test_closure.<locals>.__annotate__   rH   r   c                     R # rJ   r   rK   s   &r   rL   ,TestStringFormat.test_closure.<locals>.inner   rN   r   rO   rC   rE   Nr   r   r:   r5   r%   rL   rU   rE   s   &  @r   rW   TestStringFormat.test_closure   s8    	 	 uV]];s|,r   c                z   a  T3R lR lp\        T\        P                  R7      pT P                  TRR/4       R# )Fc                   < V ^8  d   QhRS/# rA   r   )rD   rE   s   "r   rF   =TestStringFormat.test_closure_undefined.<locals>.__annotate__   rH   r   c                     R # rJ   r   rK   s   &r   rL   6TestStringFormat.test_closure_undefined.<locals>.inner   rN   r   rO   rC   rE   Nr   r   s   &  @r   test_closure_undefined'TestStringFormat.test_closure_undefined   s6    	 	 uV]];s|,r   c                t    R  R lp\        V\        P                  R7      pV P                  VRRRR/4       R# )c                0    V ^8  d   QhR\         R\        /# r[   r]   )rD   s   "r   rF   4TestStringFormat.test_function.<locals>.__annotate__   ra   r   c                     R # rJ   r   rc   s   &&r   rd   )TestStringFormat.test_function.<locals>.f   rN   r   rO   rE   r^   r\   r_   Nr   r%   rd   rU   s   &  r   rj   TestStringFormat.test_function   s2    	 q7UC?@r   c                    R  R lp\        V\        P                  R7      pV P                  V/ RRbRRbRRbR	R
bRRbRRbRRbRRbRRbRRbRRbRRbRRbRRbRR bR!R"bR#R$bR%R&R'R(R)R*R+R,R-R.R/R0R1R2R3R4R5R6/	C4       R7# )8c          6          V ^8  d   QhR\         \        ,           R\         \        ,
          R\         \        ,          R\         \        ,          R\         \        ,          R\         \        ,          R\         \        ,          R\         \        ,	          R	\         \        ,          R
\         \        ,          R\         \        ,          R\         \        ,          R\         \        ,          R\         \        8  R\         \        8*  R\         \        8H  R\         \        8g  R\         \        8  R\         \        8  R\         ( R\         ) R\         5R\         \        ,          R\         P                  R\        \        .\        O5R\        / R\         w  /# )rB   addsubmulmatmultruedivmodlshiftrshiftor_xorand_floordivpow_ltleeqnegtgeinvertnegposgetitemgetattrcalldargs)r   r   ce)rD   s   "r   rF   7TestStringFormat.test_expressions.<locals>.__annotate__   sr    	 	Q	Q	 Q	 E		
 U	 Q	 F	 F	 Q	 Q	 a%	 1f	 Q$	 A	 Q	  Q!	" Q#	$ A%	& Q'	( B)	* +	, -	. qT/	0 SS1	2 A--Q-3	4 5	r   c                     R # rJ   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   s   &&&&&&&&&&&&&&&&&&&&&&&&&*r   rd   ,TestStringFormat.test_expressions.<locals>.f   s    8 r   rO   r   a + br   za - br   za * br   za @ br   za / br   za % br   za << br   za >> br   za | br   za ^ br   za & br   za // br   za ** br   za < br   za <= br   za == br   za != br   za > br   za >= br   z~ar   z-ar   z+ar   za[b]r   za.br   za(b, *c, d=e)r   z*aNr   r   s   &  r   test_expressions!TestStringFormat.test_expressions   s+   	< q7ww w '	
 7 w ( ( w w  H  g h  h!" h#$ gh$tt655	
r   c                    R  R lp\        V\        P                  R7      pV P                  V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/4       R# )c                j   V ^8  d   QhR^\         ,           R^\         ,
          R^\         ,          R^\         ,          R^\         ,          R^\         ,          R^\         ,          R^\         ,	          R	^\         ,          R
^\         ,          R^\         ,          R^\         ,          R^\         ,          /# )rB   raddrsubrmulrmatmulrtruedivrmodrlshiftrrshiftrorrxorrand	rfloordivrpowr   )rD   s   "r   rF   7TestStringFormat.test_reverse_ops.<locals>.__annotate__   s     	 	a%	a%	 a%	 U		
 !e	 a%	 !V	 !V	 Q	 a%	 a%	 Av	 Q$	r   c                     R # rJ   r   )r   r   r   r   r   r   r   r   r   r   r   r   r   s   &&&&&&&&&&&&&r   rd   ,TestStringFormat.test_reverse_ops.<locals>.f   s     r   rO   r   z1 + ar   z1 - ar   z1 * ar   z1 @ ar   z1 / ar   z1 % ar   z1 << ar   z1 >> ar   z1 | ar   z1 ^ ar   z1 & ar   z1 // ar   z1 ** aNr   r   s   &  r   test_reverse_ops!TestStringFormat.test_reverse_ops   sp    	" q77G88wX	
r   c                  a V3R  lR lo\        S\        P                  R7      pV P                  VRRRRRRR	R
RRRR/4       R R lp\        V\        P                  R7      pVR,          pV P                  V\        4       V P                  VP                  R4       V P                  \        VP                  4      ^4       VP                  ^ ,          pV P                  VP                  \        P                  ! R	VR7      4       V P                  VP                  R	4       V P                  VP                  4       V P                  VP                   R4       R# )c                  < V ^8  d   QhRR\         R-3 R\        R\         R-3 ,          RR\         RR-\        R-
\        RR-3 RR\        R-\        R-SR	-3 RR\         R^ -3 RR\         \        \        ,          ,          R
-3 /# )rB   rE   r   r\   rn   r   r   r   trd   z	a | b * c r   )r    r   r   )r   r   r   g)r   listr   r   r   )rD   rd   s   "r   rF   8TestStringFormat.test_template_str.<locals>.__annotate__  s     	 	!v	FqcF|	 &!AuaW!W%	  1#qc1#		
 !QCz	 !a!e)~	r   c                     R # rJ   r   )rE   r\   rn   r   r   r   s   &&&&&&r   rd   -TestStringFormat.test_template_str.<locals>.f  s     r   rO   rE   zt'{a}'r\   zlist[t'{a}']rn   zt'{a:b} {c!r} {d!s:t}'r   zt'a{b}c{d}e{f}g'r   zt'{a:1}'r   zt'{a | b * c}'c                .    V ^8  d   QhRR\         R-3 /# )rB   rE   r   r   r   )rD   s   "r   rF   r   *  s     	 	!v	r   c                     R # rJ   r   rE   s   &r   r   -TestStringFormat.test_template_str.<locals>.g*  s    r   r   rx   Nr   )r   r   r:   r5   r9   rP   r   stringsleninterpolationsr7   r   rz   
expressionassertIsNone
conversionformat_spec)r%   r   r   templinterprd   s   &    @r   test_template_str"TestStringFormat.test_template_str  s'   	 	  &--8)#!!
 		  &*;*;<c
eX.1U112A6%%a(w'@'@A'NO**C0&++,++R0r   c                j   R  R lp\        V\        P                  R7      pV P                  VRR/4       \        V\        P                  R7      pVR,          pV P                  V\        4       V P                  VP                  R\        R\        /R7      \        \        \        3,          4       R# )	c                F    V ^8  d   QhR\         \        \        3,          /# rB   rE   )undef1r   undef2)rD   s   "r   rF   3TestStringFormat.test_getitem.<locals>.__annotate__;  s     	 	V$ 	r   c                     R # rJ   r   r   s   &r   rd   (TestStringFormat.test_getitem.<locals>.f;  rN   r   rO   rE   zundef1[str, undef2]r	  r
  rf   N)r   r   r:   r5   r9   rP   r   rT   dictfloatr   ri   s   &   r   test_getitemTestStringFormat.test_getitem:  s    	q7%:;<q):):;cfj1OOXtXu$EOFSRWZHX	
r   c                f  a R  R lp\        V\        P                  R7      pV P                  VRR/4       R R lp\        V\        P                  R7      pV P                  VRR/4       \	        ^^^4      oV3R lR	 lp\        V\        P                  R7      pV P                  VRR
/4       R# )c                :    V ^8  d   QhR\         \        \         /# r  )r   r   r   )rD   s   "r   rF   1TestStringFormat.test_slice.<locals>.__annotate__H  s     	 	1Q 	r   c                     R # rJ   r   r   s   &r   rd   &TestStringFormat.test_slice.<locals>.fH  rN   r   rO   rE   za[b:c]c                ^    V ^8  d   QhR\         \        \        1\        \        13,          /# r  )r   r   r   r   r   )rD   s   "r   rF   r  M  s#     	 	1Q3!8 	r   c                     R # rJ   r   r   s   &r   rd   r  M  rN   r   za[b:c, d:e]c                   < V ^8  d   QhRS/# r  r   )rD   rt   s   "r   rF   r  S  s     	 	 	r   c                     R # rJ   r   r   s   &r   rd   r  S  rN   r   rt   N)r   r   r:   r5   slice)r%   rd   rU   rt   s   &  @r   
test_sliceTestStringFormat.test_sliceG  s    	q7X/	q7]34Aq!n	 	q7U|,r   c                    R  R lp\        V\        P                  R7      pV P                  VRRRRRRR	R
RRRRRRRR/4       R# )c                8    V ^8  d   QhR^RRRRRRRR	R
RRRRR/# )rB   r   r   g      ?r   hellor   s   hellor   Trd   Nr   .hy              ?r   )rD   s   "r   rF   4TestStringFormat.test_literals.<locals>.__annotate__Y  sX     
	 
	
	
	 
	 	
	
 
	 
	 
	 
	r   c                     R # rJ   r   )r   r   r   r   r   rd   r   r!  s   &&&&&&&&r   rd   )TestStringFormat.test_literals.<locals>.fY  s     r   rO   r   1r   z1.0r   r   r   zb'hello'r   Truerd   Noner   ...r!  1jNr   r   s   &  r   test_literalsTestStringFormat.test_literalsX  sW    
	 q7SUWZVVUT		
r   c                    R  R lp\        V\        P                  R7      pV P                  VRR/4       R R lp\        V\        P                  R7      pV P                  VRRRRR	R
RR/4       R# )c                R    V ^8  d   QhR\         \        \        .\        3,          /# r  r   r^   r   r  )rD   s   "r   rF   4TestStringFormat.test_displays.<locals>.__annotate__v  s!     	 	C:u$% 	r   c                     R # rJ   r   r   s   &r   rd   )TestStringFormat.test_displays.<locals>.fv  rN   r   rO   rE   za[[int, str], float]c          
          V ^8  d   QhR\         \        \        .\        3,          R\         \        0^3,          R\         \        \        /^3,          R\         \        \        3^3,          /# )rB   wrE   r\   rn   r.  )rD   s   "r   rF   r/  {  sb     	 	#sU"#	#{	 #sQ	 #sQ		r   c                     R # rJ   r   )r3  rE   r\   rn   s   &&&&r   r   )TestStringFormat.test_displays.<locals>.g{  s     r   r3  za[{int}, 3]r\   za[{int: str}, 4]rn   za[(int, str), 5]Nr   )r%   rd   rU   r   s   &   r   test_displaysTestStringFormat.test_displayst  sq    	q7%;<=	 q7+]''		
r   c                    R  R lp\        V\        P                  R7      pV P                  VRRRRRRR	R
RRRRRRRRRR/	4       R# )c                   V ^8  d   QhR\         \        \        \        ,          RR3,          ,          R\        \
        ,           0R\        \
        ,           \        \        ,           R\        \        ,           /R\        \
        \        .R\        \
        \        3R	\        \
        \         \        \
        \        \        1,          \        R
\         \        \
        R
 \        R,          \        R
R
\        1,          \        \
        R
\        1,          3R\        RR\        \        13,          R. \        OR. \        O\
        N\        N/	# )rB   nestedzset of intsy              @setr  keyr   tupler  N:NNNextended_sliceunpack1unpack2)
r   	Annotatedr;  r^   r   r   r   r   r   r   )rD   s   "r   rF   >TestStringFormat.test_nested_expressions.<locals>.__annotate__  s     	 	3s8]B#>?@	a%	 q5!a%A.	 a)		
 q!9	 aFAa!eHaeQqrUAaD!CaC&!ADqD'J	 aAaCiL	 qT	  qZ!ZQZ	r   c	                     R # rJ   r   )	r:  r;  r  r   r=  r  r>  r?  r@  s	   &&&&&&&&&r   rd   3TestStringFormat.test_nested_expressions.<locals>.f  s     r   rO   r:  z,list[Annotated[set[int], 'set of ints', 4j]]r;  z{a + b}r  z{a + b: c + d, 'key': e + g}r   z	[a, b, c]r=  z	(a, b, c)r  z7(a[b:c], a[b:c:d], a[:c], a[b:], a[:], a[::d], a[b::d])r>  za[:, :, c:d]r?  z[*a]r@  z
[*a, b, c]Nr   r   s   &  r   test_nested_expressions(TestStringFormat.test_nested_expressions  s_    	 q7Hy6R .6<
	
r   c                x   R pR R lpV P                  \        V4      ;_uu_ 4        \        V\        P                  R7       RRR4       R R lpV P                  \        V4      ;_uu_ 4        \        V\        P                  R7       RRR4       R#   + '       g   i     LZ; i  + '       g   i     R# ; i)z8Cannot stringify annotation containing string formattingc                &    V ^8  d   QhR\          /# )rB   fstringr   )rD   s   "r   rF   BTestStringFormat.test_unsupported_operations.<locals>.__annotate__  s     	 	! 	r   c                     R # rJ   r   )rI  s   &r   rd   7TestStringFormat.test_unsupported_operations.<locals>.f  rN   r   rO   Nc                (    V ^8  d   QhR\         R /# )rB   fstring_format02dr   )rD   s   "r   rF   rJ    s     	 	3 	r   c                     R # rJ   r   )rN  s   &r   rd   rL    rN   r   )assertRaisesRegex	TypeErrorr   r   r:   )r%   
format_msgrd   s   &  r   test_unsupported_operations,TestStringFormat.test_unsupported_operations  sy    O
	 ##Iz::Afmm4 ;	 ##Iz::Afmm4 ;: ;: ;::s   B/B(B%	(B9	c                p    R  R lpV P                  \        V\        P                  R7      RRRR/4       R# )c                ^    V ^8  d   QhR\         ^P                  ,          R^P                  /# r[   )rE   	__class__)rD   s   "r   rF   7TestStringFormat.test_shenanigans.<locals>.__annotate__  s'     	 	a]]" 	}} 	r   c                     R # rJ   r   rc   s   &&r   rd   ,TestStringFormat.test_shenanigans.<locals>.f  rN   r   rO   rE   zx | <class 'int'>r\   z<class 'int'>N)r5   r   r   r:   r%   rd   s   & r   test_shenanigans!TestStringFormat.test_shenanigans  s2    	 	Afmm4%sO<	
r   r   N)r(   r)   r*   r+   rW   r   rj   r   r   r  r  r  r*  r6  rE  rT  r]  r,   r-   r.   s   @r   r   r      sO     --A>
@$
L#1J
-"
8
2
<5	
 	
r   r   c                      a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R  t"R! t#R" t$R#t%V t&R$# )%TestGetAnnotationsi  c                    V P                  \        \        4      / 4       V P                  \        \        4      / 4       R # rJ   )r5   r   r^   objectr$   s   &r   test_builtin_type$TestGetAnnotations.test_builtin_type  s,    -r20"5r   c                ~     ! R  R\         4      p ! R RVR7      pV P                  \        V4      R\        /4       R# )c                       ] tR tRtRtR# )6TestGetAnnotations.test_custom_metaclass.<locals>.Metai  r   Nr(   r)   r*   r+   r,   r   r   r   Metarg        r   ri  c                   ,   a  ] tR tRt o V 3R ltRtV tR# )3TestGetAnnotations.test_custom_metaclass.<locals>.Ci  c                &   < V ^8  d   Qh/ S[ ;R&   # r  r^   )rD   r/   s   "r   rF   @TestGetAnnotations.test_custom_metaclass.<locals>.C.__annotate__       F r   r   Nr   r.   s   @r   Crl    r   r   rq  	metaclassrE   N)typer5   r   r^   )r%   ri  rq  s   &  r   test_custom_metaclass(TestGetAnnotations.test_custom_metaclass  s5    	4 		$ 	 	+c3Z8r   c                8    ! R  R\         4      p ! R RVR7      pV P                  \        V4      R\        /4       V P                  \        V\        P
                  R7      R\        /4       V P                  \        V\        P                  R7      RR/4       V P                  \        V4      R\        /4       V P                  \        V\        P
                  R7      R\        /4       V P                  \        V\        P                  R7      RR	/4       R
# )c                   <   a  ] tR tRt o ]R 4       tV 3R ltRtV tR# );TestGetAnnotations.test_missing_dunder_dict.<locals>.NoDicti  c                    \         hrJ   )AttributeError)clss   &r   __dict__DTestGetAnnotations.test_missing_dunder_dict.<locals>.NoDict.__dict__  s    $$r   c                &   < V ^8  d   Qh/ S[ ;R&   # rB   r   r   )rD   r/   s   "r   rF   HTestGetAnnotations.test_missing_dunder_dict.<locals>.NoDict.__annotate__  s     
 F r   r   N)	r(   r)   r*   r+   propertyr}  r   r,   r-   r.   s   @r   NoDictry    s     % %  r   r  c                   ,   a  ] tR tRt o V 3R ltRtV tR# )7TestGetAnnotations.test_missing_dunder_dict.<locals>.C1i  c                &   < V ^8  d   Qh/ S[ ;R&   # rB   r   rn  )rD   r/   s   "r   rF   DTestGetAnnotations.test_missing_dunder_dict.<locals>.C1.__annotate__  rp  r   r   Nr   r.   s   @r   C1r    r   r   r  rr  r   rO   r^   r   r   N)rt  r5   r   r^   r   r9   r:   r   )r%   r  r  s   &  r   test_missing_dunder_dict+TestGetAnnotations.test_missing_dunder_dict  s    	T 		6 	 	,sCj9Bv'8'89#J	
 	Bv}}5%L	
 	03*=F6+<+<=#J	
 	F6==9%L	
r   c                   R  R lpR R lpV P                  \        V\        P                  R7      R\        /4       V P                  \        V^R7      R\        /4       \
        P                  ! RVR7      pV P                  \        V\        P                  R7      RV/4       V P                  \        V^R7      RV/4       V P                  \        V\        P                  R7      RR/4       V P                  \        V^R7      RR/4       V P                  \        4      ;_uu_ 4        \        V^*R7       R	R	R	4       V P                  \        R
4      ;_uu_ 4        \        V\        P                  R7       R	R	R	4       V P                  \        R
4      ;_uu_ 4        \        V^R7       R	R	R	4       R	#   + '       g   i     L; i  + '       g   i     LY; i  + '       g   i     R	# ; i)c                $    V ^8  d   QhR\         /# r  rn  )rD   s   "r   rF   4TestGetAnnotations.test_format.<locals>.__annotate__  s     	 	# 	r   c                     R # rJ   r   r   s   &r   f1*TestGetAnnotations.test_format.<locals>.f1  rN   r   c                $    V ^8  d   QhR\         /# r  r   )rD   s   "r   rF   r    s     	 	) 	r   c                     R # rJ   r   r   s   &r   f2*TestGetAnnotations.test_format.<locals>.f2  rN   r   rO   r   r   rx   r^   Nz;The VALUE_WITH_FAKE_GLOBALS format is for internal use only)r5   r   r   r6   r^   r   rz   r9   r:   rR   
ValueErrorrQ  r8   )r%   r  r  fwds   &   r   test_formatTestGetAnnotations.test_format  s   		 	Bv||4#J	
 	A6c
C''2>Bv'8'89#J	
 	A6c
CBv}}5%L	
 	A6eEz**Br* + ##J
 
 Bv'E'EF	
 ##J
 
 Bq)	
 
 +*
 

 
 
s$   .F<"G$G"<G	G	"G3	c                r     ! R  R4      pV P                  \        V! 4       4      R\        R\        /4       R# )c                   &   a  ] tR tRt o R tRtV tR# )ATestGetAnnotations.test_custom_object_with_annotations.<locals>.Ci  c                ,    R \         R\        /V n        R# )rE   r\   N)r^   r   __annotations__r$   s   &r   __init__JTestGetAnnotations.test_custom_object_with_annotations.<locals>.C.__init__  s    (+S#s';$r   )r  N)r(   r)   r*   r+   r  r,   r-   r.   s   @r   rq  r    s     < <r   rq  rE   r\   N)r5   r   r^   r   )r%   rq  s   & r   #test_custom_object_with_annotations6TestGetAnnotations.test_custom_object_with_annotations  s.    	< 	< 	-S#s/CDr   c                    R  pV P                  \        4      ;_uu_ 4        \        V\        P                  RR7       \        V\        P
                  RR7       RRR4       R#   + '       g   i     R# ; i)c                      R # rJ   r   r   r   r   foo;TestGetAnnotations.test_custom_format_eval_str.<locals>.foo#  rN   r   T)rD   eval_strN)rR   r  r   r   r9   r:   r%   r  s   & r   test_custom_format_eval_str.TestGetAnnotations.test_custom_format_eval_str"  sK    	 z**C(9(9DICE +***s   9A$$A5	c           
     B   R  R lp\         P                  \         P                  3 FN  pV P                  VR7      ;_uu_ 4        V P	                  \        WR7      R\        R\        /4       RRR4       KP  	  V P	                  \        V\         P                  R7      RRRR/4       RRRR/Vn	        \          F]  pV\         P                  8X  d   K  V P                  VR7      ;_uu_ 4        V P	                  \        WR7      RRRR/4       RRR4       K_  	  V P	                  \        VR	\        4       R
7      RVR\        /4       V P	                  \        VR	\        4       R7      RVR\        /4       R#   + '       g   i     EKc  ; i  + '       g   i     K  ; i)c                0    V ^8  d   QhR\         R\        /# rB   r   r   )r^   r   )rD   s   "r   rF   ?TestGetAnnotations.test_stock_annotations.<locals>.__annotate__+  s     	 	3 	3 	r   c                     R # rJ   r   r   r   s   &&r   r  6TestGetAnnotations.test_stock_annotations.<locals>.foo+  rN   r   rO   r   r   Nr^   r   r  T)r  locals)r  rg   )r   r6   r9   subTestr5   r   r^   r   r:   r  r8   r  )r%   r  rD   s   &  r   test_stock_annotations)TestGetAnnotations.test_stock_annotations*  s\   	 ||V%6%67FV,,  #C7#sC( -, 8 	C6%e$	

  #E36F777V,,  #C7%e, -,  	C$vx@#sC 	
 	C$A#sC 	
1 -,, -,,s   )E8-!F8F
Fc                N   \         p/ R R/R\        P                  /R\        P                  /R\        P                  R R/R\        P                  R R/3 EF  pV P                  ! R/ VB ;_uu_ 4        V P                  \        V3/ VB R\        R\        /4       V P                  \        VP                  3/ VB R\        R\        /4       V P                  \        VP                  3/ VB R\        R\        RVP                  /4       V P                  \        VP                  3/ VB R\        RRRVP                  RVP                  /4       V P                  \        VP                  3/ VB RRRRRR	/4       V P                  \        \        3/ VB / 4       V P                  \        VP                  3/ VB / 4       V P                  \        VP                  3/ VB / 4       R
R
R
4       EK  	  R R/R\        P                  R R/3 EF  pV P                  ! R/ VB ;_uu_ 4        V P                  \        V3/ VB R\        R\        /4       V P                  \        VP                  3/ VB R\        R\        /4       V P                  \        VP                  3/ VB R\        R\        RVP                  /4       V P                  \        VP                  3/ VB R\        R\        RVP                  RVP                  /4       V P                  \        VP                  3/ VB R\        R\        RVP                  /4       V P                  \        \        3/ VB / 4       V P                  \        VP                  3/ VB / 4       V P                  \        VP                  3/ VB / 4       R
R
R
4       EK  	  V P                  \        V\        P                   R7      RRRR/4       V P                  \        VP                  \        P                   R7      RRRR/4       V P                  \        VP                  \        P                   R7      RRRRRR	/4       V P                  \        VP                  \        P                   R7      RRRRRR	RR	/4       V P                  \        VP                  \        P                   R7      RRRRRR	/4       V P                  \        \        \        P                   R7      / 4       V P                  \        VP                  \        P                   R7      / 4       V P                  \        VP                  \        P                   R7      / 4       R
#   + '       g   i     EK:  ; i  + '       g   i     EK  ; i)r  FrD   r   r   returnr   r   r^   r!   NTrO   r   )r   r   r6   r9   r  r5   r   r^   r   r!   function	function2	function3annotationlibUnannotatedClassunannotated_functionr:   r%   isakwargss   &  r    test_stock_annotations_in_module3TestGetAnnotations.test_stock_annotations_in_moduleL  s   ' v||$v(()v||Z7v((*e<
F '''  !?!?#sCQTAUV  #CKK:6:#sC(   #CLL;F;#sC3;;?   #CMM<V<#sE3Xs{{S   #CMM<V<%eS)<   #M<V<b   1E1E!P!PRTU  #C$<$<GG- ('
H v||Z6
F '''  !?!?#sCQTAUV  #CKK:6:#sC(   #CLL;F;#sC3;;?   #CMM<V<#sCckk8S[[Q   #CMM<V<#sCckk:   !I&!I2N  1E1E!P!PRTU  #C$<$<GG) ('	
: 	C6%e$	
 	CKK>%e$	
 	CLL?%eXy9	
 	CMM&--@%eS)XyI	
 	CMM&--@%eS)4	
 	M&--@	
 	C00G	
 	C44V]]K	
i (''> (''s   3E7U=-FV=VV$c           	        \         p\        VP                  4      pV P                  V! ^R4      VP	                  ^R4      4       V P                  VP                  VP                  P                  4       V P                  \        V4      R\        R\        RVP                  /4       V P                  \        V\        P                  R7      R\        R\        RVP                  /4       V P                  \        V\        P                  R7      RRRRRR	/4       V P                  \        VR
R7      R\        R\        RVP                  /4       V P                  \        VRR7      R\        R\        RVP                  /4       R# )r4   rE   xxxr   r   r  rO   r^   r   r!   Tr  FN)r   r   r  r5   r!   assertIsNot__globals__r   r^   r   r   r9   r:   r%   r  wrappeds   &  r   !test_stock_annotations_on_wrapper4TestGetAnnotations.test_stock_annotations_on_wrapper  s>   'cll+C#++a*?@,,cll.F.FGG$#sC3;;7	
 	GF,=,=>#sC3;;7	
 	GFMM:%eXy9	
 	Gd3#sC3;;7	
 	Ge4#sC3;;7	
r   c                   \         p/ R R/R\        P                  /R\        P                  /R\        P                  /R\        P                  R R/R\        P                  R R/R\        P                  R R/3 EFC  pV P
                  ! R/ VB ;_uu_ 4        V P                  \        V3/ VB RRRR/4       V P                  \        VP                  3/ VB RRRR/4       V P                  \        VP                  3/ VB RRRRRR/4       V P                  \        VP                  3/ VB RRRR	R
RRR/4       V P                  \        VP                  3/ VB RRRR	R
R/4       V P                  \        VP                  3/ VB / 4       V P                  \        VP                  3/ VB / 4       RRR4       EKF  	  R R/R\        P                  R R/3 EF}  pV P
                  ! R/ VB ;_uu_ 4        V P                  \        V3/ VB R\        R\        /4       V P                  \        VP                  3/ VB R\        R\        /4       V P                  \        VP                  3/ VB R\        R\        RVP                  /4       V P                  \        VP                  3/ VB R\        RRR
VP                  RVP                  /4       V P                  \        VP                  3/ VB RRRRR
R/4       V P                  \        VP                  3/ VB / 4       V P                  \        VP                  3/ VB / 4       RRR4       EK  	  R#   + '       g   i     EK  ; i  + '       g   i     EK  ; i)r  FrD   r   r^   r   r   r  r!   z'str'r   z'int'z	'MyClass'NTr   )r   r   r6   r9   r:   r  r5   r   r!   r  r  r  r  r  r^   r   r  s   &  r   %test_stringized_annotations_in_module8TestGetAnnotations.test_stringized_annotations_in_module  sX   ,v||$v(()v}}%v||Z7v((*e<v}}j%8	
F '''  #C262%e,   #CKK:6:%e,   #CLL;F;%eXyA   #CMM<V<%gsIxS   #CMM<V<'3kB   1E1E!P!PRTU  #C$<$<GG- ('	
L v||Z6
F '''  !?!?#sCQTAUV  #CKK:6:#sC(   #CLL;F;#sC3;;?   #CMM<V<#sE3Xs{{S   #CMM<V<%eS)<   1E1E!P!PRTU  #C$<$<GG' ('	
7 (''> (''s   DM7EM2M/2Nc                    \         pV P                  \        V4      / 4       V P                  \        VR R7      / 4       V P                  \        VRR7      / 4       R# )Tr  FN)r   r5   r   )r%   isa2s   & r   +test_stringized_annotations_in_empty_module>TestGetAnnotations.test_stringized_annotations_in_empty_module  sJ    /.3=rB>Cr   c           	        \         p\        VP                  4      pV P                  V! ^R4      VP	                  ^R4      4       V P                  VP                  VP                  P                  4       V P                  \        V4      RRRRRR/4       V P                  \        VR	R
7      R\        R\        RVP                  /4       V P                  \        VRR
7      RRRRRR/4       R# )r4   rE   r  r   r^   r   r   r  r!   Tr  FN)
r   r   r  r5   r!   r  r  r   r^   r   r  s   &  r   &test_stringized_annotations_on_wrapper9TestGetAnnotations.test_stringized_annotations_on_wrapper  s    ,cll+C#++a*?@,,cll.F.FGG$%eXy9	
 	Gd3#sC3;;7	
 	Ge4%eXy9	
r   c                    \         pV P                  \        VP                  4      R R/4       V P                  \        VP                  RR7      R \        /4       R# )rE   mytypeTr  N)r   r5   r   MyClassWithLocalAnnotationsr^   )r%   r  s   & r   $test_stringized_annotations_on_class7TestGetAnnotations.test_stringized_annotations_on_class&  sQ    ,C;;<(O	
 	C;;dK#J	
r   c                l  a  RR lpV 3R lp\         P                  ! RRRRRR4       Ft  w  r4rVrxS P                  VVVVVVR7      ;_uu_ 4        V! RVVRR7      p	V! RVVRRV	/R	7      p
V! R
VVRRV
/R	7      pV! WV4       V! WV4       V! WV4       R R R 4       Kv  	  R #   + '       g   i     K  ; i)Nc                 &   . pV'       d   VP                  R 4       VP                  RV  RV R24       V'       d   VP                  RV  R24       MVP                  R4       RP                  V4      p\        P                  ! WdR7      pWp,          # )	z"from __future__ import annotationszclass (z):z    z
_attr: intz    pass
)extra_names)appendjoinr   run_code)name
has_future	has_annos	base_textr  linescodenss   &&&&&   r   define_classPTestGetAnnotations.test_stringized_annotation_permutations.<locals>.define_class3  s{    EABLL6$q267tD645Z(99U#D!!$@B8Or   c                    < V'       d>   V'       d   R pM\         pSP                  \        V 4      V P                   R2V/4       R# SP                  \        V 4      / 4       R# )r^   _attrN)r^   r5   r   r(   )r|  r  r  rU   r%   s   &&& r   check_annotationsUTestGetAnnotations.test_stringized_annotation_permutations.<locals>.check_annotations@  sN     DD  !53<<.8NPT7UV  !5r:r   )meta_futurebase_futurechild_futuremeta_has_annosbase_has_annoschild_has_annosri  rt  )r  r  r  Basezmetaclass=Meta)r  r  r  r  ChildrJ   FT)	itertoolsproductr  )r%   r  r  r  r  r  r  r  r  metabasechilds   f           r   'test_stringized_annotation_permutations:TestGetAnnotations.test_stringized_annotation_permutations2  s    		; hqgxgxh
cKlN '')-- /    $*,$	 $*,.!' %+-$!' "$^D!$^D!%G= h
  s   AB""B3c                   R  R lpV P                  \        V4      R\        /4       V P                  \        V\        P                  R7      R\        /4       \
        VP                  R&   V P                  \        V4      R\
        /4       V P                  \        V\        P                  R7      R\
        /4       V P                  \        V\        P                  R7      RR/4       R# )c                $    V ^8  d   QhR\         /# r  rn  )rD   s   "r   rF   @TestGetAnnotations.test_modify_annotations.<locals>.__annotate__s       	 	 	r   c                     R # rJ   r   r   s   &r   rd   5TestGetAnnotations.test_modify_annotations.<locals>.fs  rN   r   rE   rO   r^   N)r5   r   r^   r   r9   r   r  r:   r\  s   & r   test_modify_annotations*TestGetAnnotations.test_modify_annotationsr  s    	 	+c3Z8Af&7&78#J	

 "%#+c3Z8Af&7&78#J	

 	Afmm4%L	
r   c           
     j    ! R  R4      pV! 4       p\          Fp  pV\         P                  8X  d   K  V P                  VR7      ;_uu_ 4        V P                  \        R4      ;_uu_ 4        \        W#R7       RRR4       RRR4       Kr  	  R#   + '       g   i     L; i  + '       g   i     K  ; i)c                   0   a  ] tR tRt o ]R 4       tRtV tR# )FTestGetAnnotations.test_non_dict_annotations.<locals>.WeirdAnnotationsi  c                    R # )z
not a dictr   r$   s   &r   r  VTestGetAnnotations.test_non_dict_annotations.<locals>.WeirdAnnotations.__annotations__  s    #r   r   Nr(   r)   r*   r+   r  r  r,   r-   r.   s   @r   WeirdAnnotationsr    s     $ $r   r  rO   z,.*__annotations__ is neither a dict nor NoneN)r   r8   r  rQ  r  r   )r%   r  warD   s   &   r   test_non_dict_annotations,TestGetAnnotations.test_non_dict_annotations  s    	$ 	$
 F777F++&& O   2	 ,+	 
  ,++s$   B!+B8B!BB!!B2c                F    ! R  R4      pV! 4       pV P                  \        V\        P                  R7      R\        /4       V P                  \        V\        P
                  R7      R\        /4       V P                  \        V\        P                  R7      RR/4       R# )c                   0   a  ] tR tRt o ]R 4       tRtV tR# )LTestGetAnnotations.test_annotations_on_custom_object.<locals>.HasAnnotationsi  c                    R \         /# r   rn  r$   s   &r   r  \TestGetAnnotations.test_annotations_on_custom_object.<locals>.HasAnnotations.__annotations__      Sz!r   r   Nr  r.   s   @r   HasAnnotationsr    s     " "r   r  rO   rE   r^   Nr5   r   r   r6   r^   r9   r:   )r%   r  has   &  r   !test_annotations_on_custom_object4TestGetAnnotations.test_annotations_on_custom_object  su    	" 	"
 FLLAC:NF4E4EFc
SFMMBS%LQr   c                  a  ! V3R  lR4      pV! 4       pV P                  \        4      ;_uu_ 4        \        V\        P                  R7       RRR4       V P                  \        4      ;_uu_ 4        \        V\        P
                  R7       RRR4       \        oV P                  \        V\        P                  R7      R\        /4       R#   + '       g   i     L; i  + '       g   i     L\; i)c                   8   <a  ] tR tRt o ]V3R l4       tRtV tR# )[TestGetAnnotations.test_raising_annotations_on_custom_object.<locals>.HasRaisingAnnotationsi  c                   < R S/# r   r   )r%   r   s   &r   r  kTestGetAnnotations.test_raising_annotations_on_custom_object.<locals>.HasRaisingAnnotations.__annotations__  s    Y''r   r   Nr  )r/   r   s   @r   HasRaisingAnnotationsr!    s     ( (r   r$  rO   NrE   )rR   rS   r   r   r6   r9   r  r5   )r%   r$  hrar   s   &  @r   )test_raising_annotations_on_custom_object<TestGetAnnotations.test_raising_annotations_on_custom_object  s    	( 	(
 $%y))C5 * y))C(9(9: * 	V\\BS%LQ *) *)s   C4C$C!	$C4	c                N    ! R  R4      pV! 4       pV P                  \        V\        P                  R7      R\        /4       V P                  \        V\        P
                  R7      R\        /4       V P                  \        V\        P                  R7      R\        /4       R# )c                   @   a  ] tR tRt o ]R 4       t]R 4       tRtV tR# )GTestGetAnnotations.test_forwardref_prefers_annotations.<locals>.HasBothi  c                    R \         /# r   rn  r$   s   &r   r  WTestGetAnnotations.test_forwardref_prefers_annotations.<locals>.HasBoth.__annotations__  r  r   c                    R  # )c                     R \         /# r   r  rO   s   &r   <lambda>fTestGetAnnotations.test_forwardref_prefers_annotations.<locals>.HasBoth.__annotate__.<locals>.<lambda>  s    sCjr   r   r$   s   &r   rF   TTestGetAnnotations.test_forwardref_prefers_annotations.<locals>.HasBoth.__annotate__  s    00r   r   N)	r(   r)   r*   r+   r  r  rF   r,   r-   r.   s   @r   HasBothr*    s+     " " 1 1r   r2  rO   rE   N)r5   r   r   r6   r^   r9   r:   r   )r%   r2  hbs   &  r   #test_forwardref_prefers_annotations6TestGetAnnotations.test_forwardref_prefers_annotations  st    	1 	1 YFLLAC:NF4E4EFc
SFMMBS#JOr   c                Z  a R  R lo ! V3R lR4      pV! 4       pV P                  \        V\        P                  R7      R\        /4       V P                  \        V\        P
                  R7      R\        /4       V P                  \        V\        P                  R7      RR/4       R# )c                $    V ^8  d   QhR\         /# r  rn  )rD   s   "r   rF   ;TestGetAnnotations.test_only_annotate.<locals>.__annotate__  r  r   c                     R # rJ   r   r   s   &r   rd   0TestGetAnnotations.test_only_annotate.<locals>.f  rN   r   c                   8   <a  ] tR tRt o ]V3R l4       tRtV tR# );TestGetAnnotations.test_only_annotate.<locals>.OnlyAnnotatei  c                   < SP                   # rJ   )rF   r\  s   &r   rF   HTestGetAnnotations.test_only_annotate.<locals>.OnlyAnnotate.__annotate__  s    ~~%r   r   N)r(   r)   r*   r+   r  rF   r,   r-   )r/   rd   s   @r   OnlyAnnotater<    s     & &r   r?  rO   rE   r^   Nr  )r%   r?  oard   s   &  @r   test_only_annotate%TestGetAnnotations.test_only_annotate  s~    		& 	&
 ^FLLAC:NF4E4EFc
SBv}}5%L	
r   c                z    ! R  R4      p ! R R4      p\          F  pV\         P                  8X  d   K  R^\        4       V! 4       3 FX  pV P                  W4R7      ;_uu_ 4        V P	                  \
        4      ;_uu_ 4        \        WCR7       RRR4       RRR4       KZ  	  \        \        V! 4       3 FB  pV P                  W4R7      ;_uu_ 4        V P                  \        WCR7      / 4       RRR4       KD  	  K  	  R#   + '       g   i     Lz; i  + '       g   i     K  ; i  + '       g   i     K  ; i)c                       ] tR tRtRtR# );TestGetAnnotations.test_no_annotations.<locals>.CustomClassi  r   Nrh  r   r   r   CustomClassrE    rj  r   rF  c                   &   a  ] tR tRt o R tRtV tR# ):TestGetAnnotations.test_no_annotations.<locals>.MyCallablei  c                    R # rJ   r   r$   s   &r   __call__CTestGetAnnotations.test_no_annotations.<locals>.MyCallable.__call__      r   r   N)r(   r)   r*   r+   rJ  r,   r-   r.   s   @r   
MyCallablerH    s      r   rM  N)rD   rt   rO   )
r   r8   rb  r  rR   rR  r   r^   r   r5   )r%   rF  rM  rD   rt   s   &    r   test_no_annotations&TestGetAnnotations.test_no_annotations  s    	 		 	 F777a;=9\\\99**955'; 6 :9 : S*,/\\\99$$_S%H"M :9 0 
 65 :99 :99s0   %D	DD	D)	DD	D&)D:c                   \         p\        VP                  R R7      pVP                  P                  pV P	                  VR,          V^ ,          4       V P                  VR,          P                  ^ ,          \        V^,          ,          4       V P	                  VR,          P                  ^ ,          V^,          4       R# Tr  rE   r\   rn   N)r   r   A__type_params__rh   r5   __args__r   )r%   ann_module695A_annotationsA_type_paramss   &   r   1test_pep695_generic_class_with_future_annotationsDTestGetAnnotations.test_pep695_generic_class_with_future_annotations  s    ='$G%77mC(-*:;s+44Q7a@P9QRmC(11!4mA6FGr   c           	         \        \        P                  R R7      pV P                  VR\        R\
        R\        /4       R# rQ  )r   r   Br5   r^   r   bytes)r%   B_annotationss   & r   Etest_pep695_generic_class_with_future_annotations_and_local_shadowingXTestGetAnnotations.test_pep695_generic_class_with_future_annotations_and_local_shadowing  s6    '133d
 	c3S%(HIr   c                    \         p\        VP                  R R7      pV P                  \	        VP                  4       4      \	        VP                  P                  4      4       R# Tr  N)r   r   rq  r5   r;  valuesrS  )r%   rU  C_annotationss   &  r   Mtest_pep695_generic_class_with_future_annotations_name_clash_with_global_vars`TestGetAnnotations.test_pep695_generic_class_with_future_annotations_name_clash_with_global_vars  sI     >'$G$$&']__-L-L)M	
r   c                   \         p\        VP                  R R7      pVP                  P                  pV P	                  VP                  4       0 Rm4       V P                  VR,          V^ ,          4       V P	                  VR,          \        V^,          ,          4       V P                  VR,          P                  V^,          4       V P                  VR,          P                  V^,          4       R# )Tr  rE   r\   rn   zzN>   rE   r\   rn   rg  r  )	r   r   generic_functionrS  r5   keysrh   r   
__origin__)r%   rU  generic_func_annotationsfunc_t_paramss   &   r   5test_pep_695_generic_function_with_future_annotationsHTestGetAnnotations.test_pep_695_generic_function_with_future_annotations  s    =#2**T$
  &66FF$))+-L	
 	.s3]15EF1#6}Q?O8PQ.s3>>a@PQ.t4??qAQRr   c           	         V P                  \        \        \        P                  R R7      P                  4       4      \        \        P                  P                  4      4       R# ra  )r5   r;  r   r   generic_function_2rb  rS  r$   s   &r   Qtest_pep_695_generic_function_with_future_annotations_name_clash_with_global_varsdTestGetAnnotations.test_pep_695_generic_function_with_future_annotations_name_clash_with_global_vars  sP     	9LL! &(	 5HHXX
	
r   c           	        \         p\        VP                  P                  R R7      pVP                  P                  P                   Uu/ uF  pVP
                  VbK  	  ppV P                  VRVR,          RVR,          RR/4       R# u upi )Tr  rE   Foor\   Barr  N)r   r   Dgeneric_methodrS  r(   r5   )r%   rU  generic_method_annotationsparamparamss   &    r   3test_pep_695_generic_method_with_future_annotationsFTestGetAnnotations.test_pep_695_generic_method_with_future_annotations"  s    =%4OO**T&
"
 '77GG
G NNE!G 	 
 	&&-fUmXtD	
	
s   
B
c           	         V P                  \        \        \        P                  P
                  R R7      P                  4       4      \        \        P                  P
                  P                  4      4       R# ra  )r5   r;  r   r   rv  generic_method_2rb  rS  r$   s   &r   Otest_pep_695_generic_method_with_future_annotations_name_clash_with_global_varsbTestGetAnnotations.test_pep_695_generic_method_with_future_annotations_name_clash_with_global_vars0  s\     	9;;LL! &(	 577HHXX
	
r   c                h    V P                  \        \        P                  R R7      R\        /4       R# )Tr  rE   N)r5   r   r   Er   r$   s   &r   Ytest_pep_695_generic_method_with_future_annotations_name_clash_with_global_and_local_varslTestGetAnnotations.test_pep_695_generic_method_with_future_annotations_name_clash_with_global_and_local_vars?  s*     	ACCdS#J	
r   c                   \         P                  ! 4       pV P                  \        VP                  P                  4       4      \        VP                  P                  4      4       V P                  \        VP                  P                  4       4      \        VP                  P                  P                  4      4       V P                  \        VP                  P                  4       4      \        VP                  P                  4      4       V P                  \        VP                  P                  4       4      P                  VP                  P                  4      \        4       4       V P                  VP                  R \        /4       V P                  \        VP                  P                  4       4      \        VP                  P                  4      4       R# )rE   N)r   r:  r5   r;  F_annotationsrb  FrS  F_meth_annotationsrw  assertNotEqualintersectionG_annotationsr   rk  generic_func)r%   resultss   & r   @test_pep_695_generics_with_future_annotations_nested_in_functionSTestGetAnnotations.test_pep_695_generics_with_future_annotations_nested_in_functionG  sX   7>>@%%,,./WYY5N5N1O	
 	**1134		((889	
 	**1134c')):S:S6T	
 	**1134AA		)) E		
 	..c
;00779:$$445	
r   c                   R  R lpV P                  \        V\        P                  R7      R\        P
                  ! RVR7      R\        \        ,          R\        P
                  ! RVR7      R	\        R
\        P
                  ! RVR7      \        P
                  ! RVR7      ./4       V P                  \        V\        P                  R7      RRRRRRR	RR
R/4       R# )c                    V ^8  d   QhR\         P                  R\        \        ,          R^\        ,           R\         P                  R\         P                  \         P                  ./# )rB   rE   r\   rn   r   r   )builtinsundefr   r^   )rD   s   "r   rF   @TestGetAnnotations.test_partial_evaluation.<locals>.__annotate__c  sW     	 	~~	Cy	 3w	 ||		
 -	r   c                     R # rJ   r   )rE   r\   rn   r   r   s   &&&&&r   rd   5TestGetAnnotations.test_partial_evaluation.<locals>.fc  s     r   rO   rE   zbuiltins.undefrx   r\   rn   z1 + intr   r   zbuiltins.intz	list[int]z[builtins.undef, builtins.int]N)	r5   r   r   r9   r   rz   r   r^   r:   r\  s   & r   test_partial_evaluation*TestGetAnnotations.test_partial_evaluationb  s    	 	Af&7&78W../?qIT#YW..yBS--.>aH--nAF
	
 	Afmm4%[Y^5		
r   c           	     $   R  R lpV P                  \        R4      ;_uu_ 4        VP                   RRR4       V P                  \	        V\
        P                  R7      R\        P                  ! RVR7      /4       R#   + '       g   i     LU; i)c                2    V ^8  d   QhR\         ^,          /# r  )range)rD   s   "r   rF   FTestGetAnnotations.test_partial_evaluation_error.<locals>.__annotate__  s     	 	q 	r   c                     R # rJ   r   r   s   &r   rd   ;TestGetAnnotations.test_partial_evaluation_error.<locals>.f  rN   r   z!type 'range' is not subscriptableNrO   rE   zrange[1]rx   )	rQ  rR  r  r5   r   r   r9   r   rz   r\  s   & r   test_partial_evaluation_error0TestGetAnnotations.test_partial_evaluation_error  sr    	##:
 
 

 	Af&7&78W..zC	

 
s   A??B	c           
        a \        4       o ! V3R  lR4      p\        V\        P                  R7      pV P	                  VR\
        P                  ! RRVR7      /4       R# )c                   0   <a  ] tR tRt o V V3R ltRtV tR# )MTestGetAnnotations.test_partial_evaluation_cell.<locals>.RaisesAttributeErrori  c                :   < V ^8  d   Qh/ SZP                   ;R&   # )rB   	attriberr)missing)rD   r/   rt   s   "r   rF   ZTestGetAnnotations.test_partial_evaluation_cell.<locals>.RaisesAttributeError.__annotate__  s     {{" r   r   Nr   )r/   rt   s   @r   RaisesAttributeErrorr    s      r   r  rO   r  zobj.missingTr   N)rb  r   r   r9   r5   r   rz   )r%   r  rU   rt   s   &  @r   test_partial_evaluation_cell/TestGetAnnotations.test_partial_evaluation_cell  sW    h	# 	# 3F<M<MNW66!D8L	
r   r   N)'r(   r)   r*   r+   rc  ru  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r&  r4  rA  rN  rX  r^  rd  rm  rq  r{  r  r  r  r  r  r  r,   r-   r.   s   @r   r`  r`    s     69
<'*REF 
Db
H
6AFD
$

>H@
03$
RR"P
"N*HJ
S




6"
H

 
r   r`  c                   &   a  ] tR tRt o R tRtV tR# )TestCallEvaluateFunctioni  c                   \         3R  lpV P                  \        4      ;_uu_ 4        \        P                  ! V\
        P                  4       RRR4       V P                  \        P                  ! V\
        P                  4      \        P                  ! R4      4       V P                  \        P                  ! V\
        P                  4      R4       R#   + '       g   i     L; i)c                      V ^8  d   Vh\         # )rB   r  )rD   excs   &&r   rT   :TestCallEvaluateFunction.test_evaluation.<locals>.evaluate  s    z	r   Nr   )NotImplementedErrorrR   rS   r  call_evaluate_functionr   r6   r5   r9   r   rz   r:   )r%   rT   s   & r   test_evaluation(TestCallEvaluateFunction.test_evaluation  s    !4 	
 y))006<<H *006;L;LM%%k2	
 	006==I	
 *)s   &CC&	r   N)r(   r)   r*   r+   r  r,   r-   r.   s   @r   r  r    s     
 
r   r  c                   2   a  ] tR tRt o R tR tR tRtV tR# )MetaclassTestsi  c                    ! R  R\         4      p ! R RVR7      p ! R RVR7      pV P                  \        V4      R\        /4       V P                  VP	                  \
        P                  4      R\        /4       V P                  \        V4      / 4       V P                  VP                  R4       V P                  \        V4      R	\        /4       V P                  VP	                  \
        P                  4      R	\        /4       R# )
c                   ,   a  ] tR tRt o V 3R ltRtV tR# )0MetaclassTests.test_annotated_meta.<locals>.Metai  c                &   < V ^8  d   Qh/ S[ ;R&   # r  rn  )rD   r/   s   "r   rF   =MetaclassTests.test_annotated_meta.<locals>.Meta.__annotate__  rp  r   r   Nr   r.   s   @r   ri  r    r   r   ri  c                       ] tR tRtRtR# )-MetaclassTests.test_annotated_meta.<locals>.Xi  r   Nrh  r   r   r   Xr    rj  r   r  rr  c                   ,   a  ] tR tRt o V 3R ltRtV tR# )-MetaclassTests.test_annotated_meta.<locals>.Yi  c                &   < V ^8  d   Qh/ S[ ;R&   # r  r  )rD   r/   s   "r   rF   :MetaclassTests.test_annotated_meta.<locals>.Y.__annotate__  s     H r   r   Nr   r.   s   @r   Yr    r   r   r  r   Nr   )	rt  r5   r   r^   rF   r   r6   rh   r  r%   ri  r  r  s   &   r   test_annotated_meta"MetaclassTests.test_annotated_meta  s    	4 		$ 		$ 	 	.c
;**6<<83*E+R0annd++c5\:5U|Dr   c                    ! R  R\         4      p ! R RVR7      p ! R RV4      pV P                  \        V4      / 4       V P                  VP                  R4       V P                  \        V4      / 4       V P                  VP                  R4       V P                  \        V4      R\
        /4       V P                  VP	                  \        P                  4      R\
        /4       R# )	c                       ] tR tRtRtR# )2MetaclassTests.test_unannotated_meta.<locals>.Metai  r   Nrh  r   r   r   ri  r    rj  r   ri  c                   ,   a  ] tR tRt o V 3R ltRtV tR# )/MetaclassTests.test_unannotated_meta.<locals>.Xi  c                &   < V ^8  d   Qh/ S[ ;R&   # r  r  )rD   r/   s   "r   rF   <MetaclassTests.test_unannotated_meta.<locals>.X.__annotate__  rp  r   r   Nr   r.   s   @r   r  r    r   r   r  rr  c                       ] tR tRtRtR# )/MetaclassTests.test_unannotated_meta.<locals>.Yi  r   Nrh  r   r   r   r  r    rj  r   r  Nr   )rt  r5   r   rh   rF   r   r   r6   r  s   &   r   test_unannotated_meta$MetaclassTests.test_unannotated_meta  s    	4 		$ 		 	 	.3d''.+R0annd++c3Z85SzBr   c                  a R  pV! 4       o\        S4      p\        P                  ! \        V4      V4       EF  pRP	                  V3R lV 4       4      pV P                  VR7      ;_uu_ 4        V! 4       oV F  p\        SV,          4       K  	  S F  pV P                  VR7      ;_uu_ 4        V P                  \        V4      VP                  4       \        VRR4      pVP                  '       d2   V P                  V! \        P                  4      VP                  4       MV P                  VR4       RRR4       K  	  RRR4       EK  	  R#   + '       g   i     K  ; i  + '       g   i     EKD  ; i)c                       ! R  R\         4      p  ! R R\         V R7      p ! R RVR7      p ! R RV4      p ! R	 R
V R7      pWW#V3# )c                   4   a  ] tR tRt o R]/tV 3R ltRtV tR# )@MetaclassTests.test_ordering.<locals>.make_classes.<locals>.Metai  r   c                &   < V ^8  d   Qh/ S[ ;R&   # r  rn  )rD   r/   s   "r   rF   MMetaclassTests.test_ordering.<locals>.make_classes.<locals>.Meta.__annotate__        r   r   N)	r(   r)   r*   r+   r^   expected_annotationsr   r,   r-   r.   s   @r   ri  r         (+Sz$  r   ri  c                   4   a  ] tR tRt o R]/tV 3R ltRtV tR# )=MetaclassTests.test_ordering.<locals>.make_classes.<locals>.Ai  r   c                &   < V ^8  d   Qh/ S[ ;R&   # r  r  )rD   r/   s   "r   rF   JMetaclassTests.test_ordering.<locals>.make_classes.<locals>.A.__annotate__  s      r   r   N)	r(   r)   r*   r+   r  r  r   r,   r-   r.   s   @r   rR  r    s     (+U|$  r   rR  rr  c                   4   a  ] tR tRt o R]/tV 3R ltRtV tR# )=MetaclassTests.test_ordering.<locals>.make_classes.<locals>.Bi  r   c                &   < V ^8  d   Qh/ S[ ;R&   # )rB   r   r  )rD   r/   s   "r   rF   JMetaclassTests.test_ordering.<locals>.make_classes.<locals>.B.__annotate__  r  r   r   N)	r(   r)   r*   r+   r   r  r   r,   r-   r.   s   @r   r[  r    r  r   r[  c                       ] tR tRt/ tRtR# )=MetaclassTests.test_ordering.<locals>.make_classes.<locals>.Ci  r   Nr(   r)   r*   r+   r  r,   r   r   r   rq  r        ')$r   rq  c                       ] tR tRt/ tRtR# )=MetaclassTests.test_ordering.<locals>.make_classes.<locals>.Di  r   Nr  r   r   r   rv  r    r  r   rv  )rt  )ri  rR  r[  rq  rv  s        r   make_classes2MetaclassTests.test_ordering.<locals>.make_classes  sO    2t 24DD 42a 2*A **d * A!##r   z, c              3   J   <"   T F  pSV,          P                   x  K  	  R # 5irJ   )r(   ).0iclassess   & r   	<genexpr>/MetaclassTests.test_ordering.<locals>.<genexpr>  s     A5agaj115s    #)names)r   rF   N)r   r  permutationsr  r  r  r   r5   r  r   r   r6   rh   )	r%   r  class_countorderr  r  r   annotate_funcr  s	   &       @r   test_orderingMetaclassTests.test_ordering  s#   	$* .'l++E+,>LEIIA5AAEE**&.A#GAJ/  A**(();Q=S=ST(/>4(H111 ,, -fll ;Q=S=S !MM-> +* !	 +* M +** +**s&   0AE)2BE:E)E& 	E))E;r   N)	r(   r)   r*   r+   r  r  r  r,   r-   r.   s   @r   r  r    s     E&C&*? *?r   r  c                   &   a  ] tR tRt o R tRtV tR# )!TestGetAnnotateFromClassNamespacei  c                   a   ! V 3R  lR\         4      p ! R RVR7      p ! R RVR7      p ! R RVR7      pR	p\        \        P                  ! V4      RV/4       R
# )c                   6   <a a ] tR tRt oV V3R ltRtVtV ;t# )CTestGetAnnotateFromClassNamespace.test_with_metaclass.<locals>.Metai  c                $  < \         P                  ! V4      pVR ,          pSP                  VR7      ;_uu_ 4        V'       d   SP                  V4       MSP	                  V4       RRR4       \
        SV `  WW#4      #   + '       g   i     L ; i)expected_annotate)r  N)r  !get_annotate_from_class_namespacer  assertIsNotNoner   super__new__)mclsr  basesr  annotateexpectedrX  r%   s   &&&&  r   r  KTestGetAnnotateFromClassNamespace.test_with_metaclass.<locals>.Meta.__new__  so    (JJ2N12\\t\,,,,X6))(3	 -
 wt5== -,s   ,A??B	r   )r(   r)   r*   r+   r  r,   r-   __classcell__)rX  r/   r%   s   @@r   ri  r    s     > >r   ri  c                   0   a  ] tR tRt o RtV 3R ltRtV tR# )MTestGetAnnotateFromClassNamespace.test_with_metaclass.<locals>.HasAnnotationsi  Tc                &   < V ^8  d   Qh/ S[ ;R&   # r  rn  )rD   r/   s   "r   rF   ZTestGetAnnotateFromClassNamespace.test_with_metaclass.<locals>.HasAnnotations.__annotate__  s     F r   r   N)r(   r)   r*   r+   r  r   r,   r-   r.   s   @r   r  r    s      $  r   r  rr  c                       ] tR tRtRtRtR# )LTestGetAnnotateFromClassNamespace.test_with_metaclass.<locals>.NoAnnotationsi  Fr   N)r(   r)   r*   r+   r  r,   r   r   r   NoAnnotationsr    s     %r   r  c                   *   a  ] tR tRt o RtR tRtV tR# )MTestGetAnnotateFromClassNamespace.test_with_metaclass.<locals>.CustomAnnotatei!  Tc                    / # rJ   r   rO   s   &r   rF   ZTestGetAnnotateFromClassNamespace.test_with_metaclass.<locals>.CustomAnnotate.__annotate__#  s    	r   r   N)r(   r)   r*   r+   r  rF   r,   r-   r.   s   @r   CustomAnnotater  !  s      $ r   r  z
            from __future__ import annotations

            class HasFutureAnnotations(metaclass=Meta):
                expected_annotate = False
                a: int
        N)rt  exectextwrapdedent)r%   ri  r  r  r  r  s   f     r   test_with_metaclass5TestGetAnnotateFromClassNamespace.test_with_metaclass  sS    		>4 		>	t 		&d 	&	t 	
 	X__T"VTN3r   r   N)r(   r)   r*   r+   r  r,   r-   r.   s   @r   r  r    s     4 4r   r  c                   &   a  ] tR tRt o R tRtV tR# )TestTypeRepri0  c                    ! R  R4      pR pV P                  \        \        4      R4       V P                  \        \        4      \         R24       V P                  \        V4      \         R24       V P                  \        V4      \         R24       V P                  \        \
        4      R4       V P                  \        \        4      R4       V P                  \        \        4      \         R	24       V P                  \        R
4      R4       V P                  \        R4      R4       V P                  \        ^4      R4       V P                  \        R4      R4       V P                  \        \        P                  4      \        \        P                  4      4       V P                  \        \        4       4      R4       R# )c                       ] tR tRtRtR# )+TestTypeRepr.test_type_repr.<locals>.Nestedi2  r   Nrh  r   r   r   Nestedr  2  rj  r   r   c                      R # rJ   r   r   r   r   r:  +TestTypeRepr.test_type_repr.<locals>.nested5  rN   r   r^   z.MyClassz,.TestTypeRepr.test_type_repr.<locals>.Nestedz,.TestTypeRepr.test_type_repr.<locals>.nestedr   zannotationlib.type_reprz.times_three.r(  Nr'  r%  z'1'r#   )
r5   r   r^   r!   r(   r   r   r   r6   repr)r%   r   r:  s   &  r   test_type_reprTestTypeRepr.test_type_repr1  sV   	 		 	3/7+z-BCf(+WX	
 	f(+WX	
 	3/9-/HI;/H:\1JK3/4&11s+3/6<<0$v||2DE79-y9r   r   N)r(   r)   r*   r+   r$  r,   r-   r.   s   @r   r  r  0  s     : :r   r  c                   &   a  ] tR tRt o R tRtV tR# )TestAnnotationsToStringiK  c                   V P                  \        / 4      / 4       V P                  \        R \        /4      R R/4       V P                  \        R R/4      R R/4       V P                  \        R \        R\        /4      R RRR/4       R# )rE   r^   r\   r   N)r5   r   r^   r   r$   s   &r   test_annotations_to_string2TestAnnotationsToString.test_annotations_to_stringL  s~    .r2B7.Sz:S%LI.U|<sElK!3S#"67#uc59Q	
r   r   N)r(   r)   r*   r+   r)  r,   r-   r.   s   @r   r'  r'  K  s     
 
r   r'  c                       ] tR tRtRtR# )rR  iU  r   Nrh  r   r   r   rR  rR  U  s    r   rR  c                  8   a R 5;p R5;p3o ! V3R lRS5
q"4      # )TypeParamsAlias1TypeParamsAlias2c                   "   < ] tR tRt Z t]tRtR# )TypeParamsSampleiZ  r   N)r(   r)   r*   r+   rS  r   r.  r,   .type_paramss   r   r0  r0  Z  s     r   r0  r   )r-  r.  .generic_baser2  s      @r   (<generic parameters of TypeParamsSample>r4  Z  s    ')9'   r   c                      a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )TestForwardRefClassi^  c                    \        R 4      pV P                  \        4      ;_uu_ 4        \        ^*V4       RRR4       R#   + '       g   i     R# ; ir^   N)r   rR   rR  
isinstancer%   frs   & r   #test_forwardref_instance_type_error7TestForwardRefClass.test_forwardref_instance_type_error_  s6    y))r2 *)))s   A  A	c                    \        R 4      pV P                  \        4      ;_uu_ 4        \        \        V4       RRR4       R#   + '       g   i     R# ; ir8  )r   rR   rR  
issubclassr^   r:  s   & r   #test_forwardref_subclass_type_error7TestForwardRefClass.test_forwardref_subclass_type_errord  s6    y))sB *)))s   AA	c                    V P                  \        4      ;_uu_ 4        \        ^4       RRR4       R#   + '       g   i     R# ; ir3   )rR   rR  r   r$   s   &r   test_forwardref_only_str_arg0TestForwardRefClass.test_forwardref_only_str_argi  s)    y))qM *)))s	   4A	c                   \        R 4      pV P                  V\        R 4      4       V P                  \        R ,          \        \        ,          4       V P                  V\        R \
        R7      4       \        R \
        R7      pV P                  V\        R \
        R7      4       V P                  V\        R RR7      4       R# )r^   rs   __other_name__N)r   r5   r  r
   r^   r(   )r%   r;  frms   &  r   test_forward_equality)TestForwardRefClass.test_forward_equalitym  s    Z./DKc3B
5 BCx0jx@ACE:J!KLr   c                  aa \        R 4      p\        R 4      o\        R 4      p\        R 4      o ! R R 4      pVV3R lR lpV P                  \        V\        4       \	        4       4      RVRV/4       V P                  W4       V P                  VS4       V P                  SS4       V P                  \
        V,          \
        S,          4       V P                  \
        V,          \
        V,          4       V P                  \
        S,          \
        V,          4       V P                  \        VS3,          \        V,          4       V P                  \        VS\        3,          \        V\        3,          4       R# )rq  c                       ] tR tRtRtR# )CTestForwardRefClass.test_forward_equality_get_type_hints.<locals>.Ci|  r   Nrh  r   r   r   rq  rM  |  rj  r   c                "   < V ^8  d   QhRSRS/# r  r   )rD   c1_gthc2_gths   "r   rF   NTestForwardRefClass.test_forward_equality_get_type_hints.<locals>.__annotate__       	 	6 	f 	r   c                     R # rJ   r   r  s   &&r   r  ETestForwardRefClass.test_forward_equality_get_type_hints.<locals>.foo  rN   r   r   r   N)	r   r5   r	   rg   r  r
   r  r   r^   )r%   c1c2rq  r  rO  rP  s   &    @@r   $test_forward_equality_get_type_hints8TestForwardRefClass.test_forward_equality_get_type_hintsv  s   _C_C	 		 	 	WYACCQRCST V$(b4<0DHd1g.DL$q'2r6z*E"I6r63/r3w@r   c           
       aa \        R 4      p\        R 4      o\        R 4      p\        R 4      oVV3R lR lp\        V\        4       \        4       4       V P	                  \        V4      \        V4      4       V P	                  \        S4      \        S4      4       V P	                  \        V4      \        S4      4       \        R \        R7      p\        R RR7      pV P                  \        V4      \        V4      4       V P                  \        V4      \        S4      4       V P                  \        V4      \        V4      4       V P	                  \        V4      \        \        R \        R7      4      4       R# )r^   c                "   < V ^8  d   QhRSRS/# r  r   )rD   rO  rP  s   "r   rF   DTestForwardRefClass.test_forward_equality_hash.<locals>.__annotate__  rR  r   c                     R # rJ   r   r  s   &&r   r  ;TestForwardRefClass.test_forward_equality_hash.<locals>.foo  rN   r   rF  rG  N)r   r	   rg   r  r5   hashr(   r  )r%   rU  rV  r  c3c4rO  rP  s   &     @@r   test_forward_equality_hash.TestForwardRefClass.test_forward_equality_hash  s   E"E"	 	 	sGIvx0b48,ftF|4b4<0h/&67DHd2h/DHd6l3DHd2h/b4
5(J#KLr   c                    R  pR pV P                  V! 4       V! 4       4       V P                  V! 4       V! 4       4       R# )c                  j   a \        R 4      oV3R lR lp \        V \        4       \        4       4       S# )rR  c                   < V ^8  d   QhRS/# r  r   )rD   r   s   "r   rF   ]TestForwardRefClass.test_forward_equality_namespace.<locals>.namespace1.<locals>.__annotate__        q r   c                     R # rJ   r   r   s   &r   funTTestForwardRefClass.test_forward_equality_namespace.<locals>.namespace1.<locals>.fun  rL  r   r   r	   rg   r  )ri  r   s    @r   
namespace1GTestForwardRefClass.test_forward_equality_namespace.<locals>.namespace1  s-    3A  3	684Hr   c                  ~   a \        R 4      o ! R R 4      p V3R lR lp\        V\        4       \        4       4       S# )rR  c                       ] tR tRtRtR# )RTestForwardRefClass.test_forward_equality_namespace.<locals>.namespace2.<locals>.Ai  r   Nrh  r   r   r   rR  rp    s    r   c                   < V ^8  d   QhRS/# r  r   )rD   r   s   "r   rF   ]TestForwardRefClass.test_forward_equality_namespace.<locals>.namespace2.<locals>.__annotate__  rg  r   c                     R # rJ   r   r   s   &r   ri  TTestForwardRefClass.test_forward_equality_namespace.<locals>.namespace2.<locals>.fun  rL  r   rk  )rR  ri  r   s     @r   
namespace2GTestForwardRefClass.test_forward_equality_namespace.<locals>.namespace2  s7    3A   3	684Hr   N)r5   )r%   rl  ru  s   &  r   test_forward_equality_namespace3TestForwardRefClass.test_forward_equality_namespace  s6    	
	 	z|4z|4r   c           
         V P                  \        \        R ,          4      R4       V P                  \        \        \        R RR7      ,          4      R4       R# )r^   ztyping.List[ForwardRef('int')]r   rF  z,typing.List[ForwardRef('int', module='mod')]N)r5   r#  r
   r   r$   s   &r   test_forward_repr%TestForwardRefClass.test_forward_repr  sA    d5k*,LMju567:	
r   c                r    R  pR pV! 4       pV! 4       pV P                  W44       V P                  W44       R# )c                  n   a \        R 4      oSp V3R lR lp\        V\        4       \        4       4      pS# )rR  c                   < V ^8  d   QhRS/# r  r   )rD   r   s   "r   rF   ]TestForwardRefClass.test_forward_recursion_actually.<locals>.namespace1.<locals>.__annotate__  rg  r   c                     R # rJ   r   r   s   &r   ri  TTestForwardRefClass.test_forward_recursion_actually.<locals>.namespace1.<locals>.fun  rL  r   rk  rR  ri  retr   s      @r   rl  GTestForwardRefClass.test_forward_recursion_actually.<locals>.namespace1  4    3AA  !gi:CHr   c                  n   a \        R 4      oSp V3R lR lp\        V\        4       \        4       4      pS# )rR  c                   < V ^8  d   QhRS/# r  r   )rD   r   s   "r   rF   ]TestForwardRefClass.test_forward_recursion_actually.<locals>.namespace2.<locals>.__annotate__  rg  r   c                     R # rJ   r   r   s   &r   ri  TTestForwardRefClass.test_forward_recursion_actually.<locals>.namespace2.<locals>.fun  rL  r   rk  r  s      @r   ru  GTestForwardRefClass.test_forward_recursion_actually.<locals>.namespace2  r  r   N)r  r5   )r%   rl  ru  r1r2s   &    r   test_forward_recursion_actually3TestForwardRefClass.test_forward_recursion_actually  s8    		 \\  r   c                    V P                  \        4      ;_uu_ 4        \        P                  R ,           RRR4       R#   + '       g   i     R# ; i)z/TN)rR   SyntaxErrorr   Genericr$   s   &r   test_syntax_error%TestForwardRefClass.test_syntax_error  s.    {++NN4  ,+++s   A  A	c                    R  R lpV P                  \        4      ;_uu_ 4        \        V4       RRR4       R#   + '       g   i     R# ; i)c                    V ^8  d   QhRR/# )rB   r   zNode[Tr   )rD   s   "r   rF   CTestForwardRefClass.test_delayed_syntax_error.<locals>.__annotate__  s     	 	8 	r   c                     R # rJ   r   r   s   &r   r  :TestForwardRefClass.test_delayed_syntax_error.<locals>.foo  rN   r   N)rR   r  r	   r  s   & r   test_delayed_syntax_error-TestForwardRefClass.test_delayed_syntax_error  s1    	 {++3 ,+++s	   :A	c           
        \         P                  \         P                  \         P                  \         P                  3 FU  pV P                  VR 7      ;_uu_ 4        V P                  \        4      ;_uu_ 4        VR,           RRR4       RRR4       KW  	  R#   + '       g   i     L; i  + '       g   i     K  ; i))formr   N)r   r
   SetTypeDequer  rR   r  )r%   r  s   & r   test_syntax_error_empty_string2TestForwardRefClass.test_syntax_error_empty_string  so    [[&**fkk6<<HD4((&&{33H 4 )( I33 )((s$   B-:
BB-B*%B--B>c                    \        R 4      pV P                  VR,          \        VR3,          4       V P                  RV,          \        RV3,          4       R# )r  rE   N)r   r5   r   )r%   r  s   & r   test_orTestForwardRefClass.test_or  sC    sOS%3-0q%Q-0r   c                    \         R ,          pV P                  V\        4       \        R 4      pV P                  V\        4       V P                  W4       R# )r  N)r   rP   r   r5   )r%   X1X2s   &  r   test_multiple_ways_to_create0TestForwardRefClass.test_multiple_ways_to_create  sB    3Zb*-_b*- r   c                   \        R 4      pV P                  VR4       V P                  VR4       V P                  VP                  R4       VP                   \        \        P                  ^,           4       F?  pV P                  \        4      ;_uu_ 4        \        P                  ! W4       RRR4       KA  	  R#   + '       g   i     KV  ; i)set[Any]r(   r*   r  N)r   assertNotHasAttrr5   r)   __forward_code__r  pickleHIGHEST_PROTOCOLrR   rR  dumps)r%   r;  protos   &  r   test_special_attrs&TestForwardRefClass.test_special_attrs  s     
#b*-b.18
622Q67E""9--R' .- 8---s   B==Cc                |    \        R 4      pV P                  VP                  \        P                  R7      R 4       R# )r  rO   N)r   r5   rT   r   r:   r:  s   & r   test_evaluate_string_format/TestForwardRefClass.test_evaluate_string_format  s+    
#FMM:JGr   c           	        \        R 4      pVP                  \        P                  R7      pV P	                  W4       \        R4      pVP                  \        P                  R7      pV P                  V\        \        P                  ! R4      ,          4       \        R4      pV P                  VP                  \        P                  R7      \        P                  ! R4      4       V P                  VP                  \        P                  R^R^/R7      ^4       \        R4      pV P                  VP                  \        P                  R7      \        P                  ! R4      4       R	# )
r  rO   zset[undefined]r   r   r   r   )rD   r  z"a" + 1N)	r   rT   r   r9   rh   r5   r;  r   rz   )r%   r;  	evaluateds   &  r   test_evaluate_forwardref_format3TestForwardRefClass.test_evaluate_forwardref_format  s    KKv'8'8K9	b$()KKv'8'8K9	))+67	

  KKv00K1%%g.	
 	KKv00#q#q9IKJ	

 	"KKv00K1%%i0	
r   c                $   R  ! 4       pV P                  \        4      ;_uu_ 4        \        R4      P                  4        RRR4       V P                  \        4      ;_uu_ 4        \        R4      P                  RR7       RRR4       V P                  \        4      ;_uu_ 4        \        R4      P                  \        R7       RRR4       VP
                  w  pV P                  \        R4      P                  VP
                  R7      V4       V P                  \        R4      P                  VR7      V4       V P                  \        4      ;_uu_ 4        \        R4      P                  VP
                  R7       RRR4       V P                  \        R4      P                  VR7      \        4       V P                  \        4      ;_uu_ 4        \        R4      P                  V/ R7       RRR4       V P                  \        R4      P                  VR\        /R7      \        4       R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i)c                  0   a R 5;p 3o ! V3R lRS5
q4      # )Tc                   "   < ] tR tRt Z t]tRtR# )?TestForwardRefClass.test_evaluate_with_type_params.<locals>.Geni,  r   N)r(   r)   r*   r+   rS  r^   aliasr,   r1  s   r   Genr  ,  s
     Er   r  r   )r  r3  r2  s     @r   <generic parameters of Gen>WTestForwardRefClass.test_evaluate_with_type_params.<locals>.<generic parameters of Gen>,  s    ! 	 	 	r   r  N)type_paramsrx   r  )ry   r  r   )rR   rS   r   rT   r^   rS  rh   r   )r%   r  r  s   &  r   test_evaluate_with_type_params2TestForwardRefClass.test_evaluate_with_type_params+  s   	 y))sO$$& *y))sO$$$4 *y))sO$$3$/ * ""jo..3;N;N.OQRSjo..S.91=y))w((S5H5H(I *j)222=sCy))w((s2(> * 	w((sGS>(JC	
% *)))))))) *) *)s;   H0%I& I&I,I?0I	I	I)	,I<	?J	c           	        R F  pV P                  VR7      ;_uu_ 4        \        R\        VR7      p\        R\        VR7      pV P                  VP	                  4       \        P
                  ^ ,          4       V P                  VP	                  4       \        P                  4       RRR4       K  	  R#   + '       g   i     K  ; i)F)r   r-  )ry   r   r.  Nr  )r  r   r0  rh   rT   rS  r.  )r%   r   fwdref1fwdref2s   &   r   1test_evaluate_with_type_params_and_scope_conflictETestForwardRefClass.test_evaluate_with_type_params_and_scope_conflictE  s    %Hx00$%7?OZbc$%7?OZbc$$&$44Q7 $$&$55 10 &000s   BB66Cc                   V P                  \        R RR7      P                  4       \        4       V P                  \        RRR7      P                  4       \        P
                  4       V P                  \        RRR7      P                  4       \        P
                  \        ,          4       V P                  \        4      ;_uu_ 4        \        R RR7      P                  / R7       RRR4       R#   + '       g   i     R# ; i)r   r  rF  CountercollectionsCounter[int]rf   N)
rh   r   rT   r   r  r  r5   r^   rR   rS   r$   s   &r   test_fwdref_with_module+TestForwardRefClass.test_fwdref_with_moduleT  s    j/BKKMvVy7@@BKDWDW	
 	~m<EEG$	

 y))x8AA"AM *)))s   
C22D	c                   V P                  \        R 4      P                  4       \        4       V P                  \        R RR7      P                  4       \        4       V P                  \        R \        R7      P                  4       \        4       V P                  \        R 4      P                  / R7      \        4       \        4       pV P                  \        R 4      P                  R V/R7      V4       R# )r^   r  rF  rx   rf   N)rh   r   rT   r^   r   rb  )r%   rt   s   & r   test_fwdref_to_builtin*TestForwardRefClass.test_fwdref_to_builtinb  s    j'002C8j}=FFH#Njc2;;=sC 	j'000<cB hj'00%0FLr   c                   \        R 4      pV P                  \        4      ;_uu_ 4        VP                  4        RRR4       V P	                  VP                  R \
        /R7      \
        4       V P                  \        4      ;_uu_ 4        VP                  4        RRR4       R#   + '       g   i     Lt; i  + '       g   i     R# ; i)r   Nrf   )r   rR   rS   rT   rh   r   r:  s   & r   test_fwdref_value_is_not_cached3TestForwardRefClass.test_fwdref_value_is_not_cachedn  s     y))KKM *bkk7C.k93?y))KKM *) *) *))s   B&B9&B6	9C
	c                    V P                  \        R \        R7      P                  4       \        P                  \
        ,          4       R# )r  rx   N)r5   r   r  rT   r  r^   r$   s   &r   test_fwdref_with_owner*TestForwardRefClass.test_fwdref_with_ownerv  s1    ~[9BBD$	
r   c                   V P                  \        R 4      P                  4       \        4       V P                  \        R 4      P                  R \        /R7      \        4       V P                  \        R 4      P                  R \
        /R \        /R7      \
        4       V P                  \        R 4      P                  R \        /R7      \        4       \        P                  ! \        R \        4      ;_uu_ 4        V P                  \        R 4      P                  4       \        4       RRR4       V P                  \        RR7      ;_uu_ 4       p\        R4      P                  4        RRR4       V P                  XP                  P                  R4       R#   + '       g   i     Ly; i  + '       g   i     LK; i)r^   )r  )r  rg   rf   Nz!name 'doesntexist' is not defined)msgr_   )rh   r   rT   r^   r   r  r   	swap_attrr  r  rR   rS   r5   	exceptionr  )r%   r  s   & r   test_name_lookup_without_eval1TestForwardRefClass.test_name_lookup_without_eval|  s3    	j'002C8j'000EsKu&&uenucl&S	
 	j'00%0FLx55MM*U+446= 6 y.QRRVY}%..0 S 	++]; 65 SRs   <.FF.F+	.F>	c                X   \        R 4      pV P                  \        4      ;_uu_ 4        VP                  4        RRR4       \        R4      pV P                  \        4      ;_uu_ 4        VP                  4        RRR4       R#   + '       g   i     LS; i  + '       g   i     R# ; i)ifNz1+)r   rR   r  rT   r:  s   & r   test_fwdref_invalid_syntax.TestForwardRefClass.test_fwdref_invalid_syntax  sl    {++KKM ,{++KKM ,+ ,+ ,++s   B*BB	B)	r   N)r(   r)   r*   r+   r<  r@  rC  rI  rW  ra  rw  rz  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r,   r-   r.   s   @r   r6  r6  ^  s     
 
MA,M.52
!4!
 1!(H
8
4N
M
<$ r   r6  c                   J   a  ] tR tRt o R t]P                  R 4       tRtV t	R# )TestAnnotationLibi  c                <    \         P                  ! V \        4       R # rJ   )r   check__all__r  r$   s   &r   test__all__TestAnnotationLib.test__all__  s    T=1r   c                8    \         P                  ! R RR04       R# )r  r   warningsN)r   ensure_lazy_importsr$   s   &r   test_lazy_imports#TestAnnotationLib.test_lazy_imports  s    ))	
r   r   N)
r(   r)   r*   r+   r  r   cpython_onlyr  r,   r-   r.   s   @r   r  r    s$     2 
 
r   r  )0__doc__r  r  r  r  r   r  r  string.templatelibr   r   unittestr   r   r   r   r   r   r	   r
   r   testr   test.supportr   test.test_inspectr   r   r   r   r   r!   TestCaser1   r>   r   r`  r  r  r  r  r'  rR  r^   r-  r0  r6  r  r   r   r   <module>r     sF   '        '    7 6  & 7 < > C 
+"" +W
8,, W
to
x(( o
d	]
** ]
@
x00 
&Q?X&& Q?h 4(9(9  4F:8$$ :6
h// 
	 	  v(++ vr	
)) 
r   