+
    xȇi              	         a  R( t40 t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
 ^ RItR]P                  9   t]'       d
   ]R)9  d   Rt]P                  P                  ]'       * RR7      t ^ RIHt R	t]
'       d   ^ R
IHt ^ RIHt ]P2                  P5                  ]P2                  P7                  ]4      R4      t]P2                  P5                  ]R4      t]P2                  P5                  ]R4      t]P2                  P5                  ]R4      t ]P2                  P5                  ]R4      t!]P2                  P5                  ]R4      t"]P2                  P5                  ]R4      t#]! ]$4      t%] ^ k R R lt&R R lt'R R lt(]PR                  ! RRR7      R R l4       t*R R lt+R*t,R+t-Rt.]P                  P^                  ]P                  P                  ]R R7      ]P                  Pa                  R!]+! ]]4      4      R" R# l4       4       4       t1]P                  P^                  ]P                  P                  ]R R7      ]P                  Pa                  R!]+! ] 4      4      R$ R% l4       4       4       t2]P                  P^                  ]P                  P                  ]R R7      ]P                  Pa                  R!]+! ]4      4      R& R' l4       4       4       t3R#   ] d    Rt ELsi ; i),    N)defaultdict)TYPE_CHECKINGNPY_RUN_MYPY_IN_TESTSUITETz#`NPY_RUN_MYPY_IN_TESTSUITE` not set)reason)apiF)Iterator)ParameterSetdatapassfailrevealmisczmypy.iniz.mypy_cachec                0    V ^8  d   QhR\         R\         /# )   keyreturnstr)formats   "n/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/numpy/typing/tests/test_typing.py__annotate__r   4   s     6 63 63 6    c                    \         P                  P                  V 4      w  r\         P                  P                  WP	                  R^4      ^ ,          4      # )zqSplit at the first occurrence of the ``:`` character.

Windows drive-letters (*e.g.* ``C:``) are ignored herein.
:)ospath
splitdrivejoinsplit)r   drivetails   &  r   	_key_funcr"   4   s=    
 ''$$S)KE77<<zz#q1!455r   c                R    V ^8  d   QhR\         R\        \        \         3,          /# )r   msgr   )r   tupleint)r   s   "r   r   r   =   s"     $ $ $sCx $r   c                    \         P                  P                  V 4      w  rVP                  R^4      w  rp \	        V4      V P                  4       3# )z7Strip the filename and line number from a mypy message.r   )r   r   r   r   r&   strip)r$   _r!   linenos   &   r   _strip_filenamer+   =   sA    gg  %GAZZQ'NAsv;		##r   c                Z    V ^8  d   QhR\         P                  \        ,          R\        /# )r   matchr   )reMatchr   )r   s   "r   r   r   D   s"      bhhsm  r   c                0    V P                  4       ^,          # )z4`re.sub` helper function for stripping module names.)groups)r-   s   &r   
strip_funcr2   D   s    <<>!r   module)scopeautousec                    V ^8  d   QhRR/# r   r   N )r   s   "r   r   r   J   s     *  * $ * r   c                    \         P                  P                  \        4      '       dJ   \	        \         P
                  P                  RR4      4      '       d   \        P                  ! \        4       \        P                  ! R4      p \        \        \        \        3 F  p\        P                   ! R\"        R\        V.4      w  r#pV'       d   \$        P&                  ! RV 2R4       M$VR9  d   \$        P&                  ! RV R	V 2R4       R
pRpVP)                  R4       F[  pRV9   d   K  Vf   \+        V4      pWW R2,          pV P-                  V4      f   K;  \.        V,          P1                  V4       R
pRpK]  	  K  	  R# )zClears the cache and run mypy before running any of the typing tests.

The mypy results are cached in `OUTPUT_MYPY` for further use.

The cache refresh can be skipped using

NUMPY_TYPING_TEST_CLEAR_CACHE=0 pytest numpy/typing/tests
NUMPY_TYPING_TEST_CLEAR_CACHETz(\s+)?\^(\~+)?z--config-filez--cache-dirz Unexpected mypy standard error

FzUnexpected mypy exit code: z

 N
znote:>   r      )r   r   isdir	CACHE_DIRboolenvirongetshutilrmtreer.   compilePASS_DIR
REVEAL_DIRFAIL_DIRMISC_DIRr   runMYPY_INIpytestr   r   r"   r-   OUTPUT_MYPYappend)split_pattern	directorystdoutstderr	exit_code
str_concatfilenameis           r   run_mypyrW   I   s9    	i   ?FGGi JJ01M
Hh?	$'GG-
 %!	 KK<VHEuMf$KK5i[VHMuU
#d#A!|$Q<Cr("J""1%1H%,,Z8
 $! @r   c                (    V ^8  d   QhR\         RR/# )r   directoriesr   zIterator[ParameterSet]r   )r   s   "r   r   r   w   s     	= 	= 	=)A 	=r   c               '   6  "   V  F  p\         P                  ! V4       Fq  w  r#pV Fe  p\         P                  P                  V4      w  rgVR9  d   K-  \         P                  P	                  W%4      p\
        P                  ! WR7      x  Kg  	  Ks  	  K  	  R# 5i).pyi)idN)r[   z.py)r   walkr   splitextr   rL   param)	rY   rP   rootr)   filesfnameshort_fnameextfullpaths	   *        r   get_test_casesrf   w   ss      	 ggi0NDU#%77#3#3E#: o-77<<4ll8<<  1 !s   BBz{}:{} - reveal mismatch:

{}zMypy is not installedr   c                    V ^8  d   QhRR/# r7   r8   )r   s   "r   r   r      s     8 8t 8r   c                 n   \         pW9  d   R # \        P                  P                  V 4      p. pW,           FH  p\	        V4      w  rVVP                  R4      P                  4       pVP                  V RV RV 24       KJ  	  V'       d*   \        P                  ! RP                  V4      RR7       R # R # )Nzerror:r   z - r<   Fpytrace)rM   r   r   relpathr+   removeprefixlstriprN   rL   r   r   )r   output_mypyrk   messagesmessager*   contents   &      r   	test_passrr      s    
 Kggood#G H$$)'2&&x07797)1VHCy9: %
 DIIh'7 r   c                (    V ^8  d   QhR\         RR/# r   r   r   Nr   )r   s   "r   r   r      s     , ,c ,d ,r   c                   Rp\         pW9  d   R# \        P                  P                  V 4      p. pW ,           FR  p\	        V4      w  rg\
        P                  ! V\        4      p\        P                  W6V4      pVP                  V4       KT  	  V'       d0   \        P                  V4      p	\        P                  ! V	RR7       R# R# )zSValidate that mypy correctly infers the return-types of
the expressions in `path`.
TNFri   )rM   r   r   rk   r+   textwrapindent_FAIL_INDENT_FAIL_MSG_REVEALr   rN   	_FAIL_SEPr   rL   r   )
r   __tracebackhide__rn   rk   failures
error_liner*   	error_msgr   reasonss
   &         r   test_revealr      s     Kggood#G H!''
+J7OOI|<	!(()D	 ( ..*GU+ r   c                (    V ^8  d   QhR\         RR/# rt   r   )r   s   "r   r   r      s     ) ) ) )r   c                z   \         P                  P                  V 4      w  rV P                  \         P                  4      RR w  r4\
        P                  P                  V RV 2V 4      pVf   Q hVP                  f   Q h\
        P                  P                  V4      pVP                  P                  V4       R# )z9Validate that the code in `path` properly during runtime.N.)r   r   r^   r   sep	importlibutilspec_from_file_locationloadermodule_from_specexec_module)r   path_without_extensionr)   dirnamerU   spectest_modules   &      r   test_code_runsr      s    
 !# 0 0 6

266*23/G>>11)1XJD ;;"""..11$7KKKK(r   c                x    V ^8  d   Qh/ ^ \         9   d&   \        \        \        \        ,          3,          ;R&   # )r   rM   )__conditional_annotations__r   r   list)r   s   "r   r   r      s)      ` = <[d3i( <a r   )0r;   falsez    zR
_______________________________________________________________________________

)5r   importlib.utilr   r   r.   rC   rv   collectionsr   typingr   rL   rA   RUN_MYPYmarkskipif
pytestmarkmypyr   NO_MYPYImportErrorcollections.abcr   _pytest.mark.structuresr	   r   r   r   __file__DATA_DIRrF   rH   rG   rI   rK   r?   r   rM   r"   r+   r2   fixturerW   rf   rx   rz   ry   slowparametrizerr   r   r   r   )r   s   @r   <module>r      s     	 	   #   
 '"**4 22H [[L0   
 G( 577<<16:77<<&)77<<&)WW\\(H-
77<<&)77<<*-GGLL=1	 ,7t+< <6$
 h-*  .* Z	= $	 
 G$;<(!CD8 E = 8( G$;<
!;<, = = ,2 G$;<!9:) ; = )M  Gs   .K 	K*)K*