
    g                    (   d dl mZ d dlZd dlZd dlmZ d dlZd dlmZm	Z	m
Z
mZ erd dlmZ ej                  j                  dddd	 ed
dddddd      fd eddddddd      fd edddd      fgg d      d"d       Zd#d Z	 	 	 	 	 	 	 	 d$d!Zy)%    )annotationsN)TYPE_CHECKING)Resultexportmainprocess_line)Path)srcexpected) N)za regular line
Nz*package\filename.py:42:8: note: Some info
noticepackage\filename.py*      
 Some infokindfilename
start_line	start_colend_lineend_colmessagez=package/filename.py:42:1:46:3: error: Type error here [code]
errorpackage/filename.py   .       Type error here [code]z%package/module.py:87: warn: Bad code
warningpackage/module.pyW   	 Bad coder   r   r   r   )blanknormalz	note-wcolz
error-wendzwarn-lineonly)idsc                (    t        |       }||k(  sJ y )N)r   )r
   r   results      W/var/www/html/venv/lib/python3.12/site-packages/trio/_tests/tools/test_mypy_annotate.pytest_processingr+      s    T #FX    c                    t        ddddd d d      ddgt        d	d
ddddd      ddgt        dddd      dgi}t        |       | j                         }|j                  dk(  sJ |j                  dk(  sJ y )Nr   r   r   r   r   r   WindowsMacr   r   r   r   r   r   Linuxr    r!   r"   r#   r$   r   a^  ::notice file=package\filename.py,line=42,col=8,title=Mypy-Windows+Mac::package\filename.py:(42:8): Some info
::error file=package/filename.py,line=42,col=1,endLine=46,endColumn=3,title=Mypy-Linux+Mac::package/filename.py:(42:1 - 46:3): Type error here [code]
::warning file=package/module.py,line=87,title=Mypy-Linux::package/module.py:87: Bad code
)r   r   
readouterrerrout)capsysresultsstds      r*   test_exportr7   =   s    + 	
 u*-	
 U(		

 91G4 7O



C77b==77	=	 	 	r,   c                :   dd l mc m} d}| dz  }|j                         rJ |j	                         5  |j                  t        dt        j                  |             |j                  dt        |      ddg       d d d        |j                         }|j                  dk(  sJ |j                  |k(  sJ |j                         sJ t        dt        |      g       |j                         }|j                  dk(  sJ |j                  d	k(  sJ y # 1 sw Y   xY w)
Nr   zMypy begun
trio/core.py:15: error: Bad types here [misc]
trio/package/module.py:48:4:56:18: warn: Missing annotations  [no-untyped-def]
Found 3 errors in 29 files
zdump.datstdinz
--dumpfilez
--platformSomePlatformr   a  ::error file=trio/core.py,line=15,title=Mypy-SomePlatform::trio/core.py:15: Bad types here [misc]
::warning file=trio/package/module.py,line=48,col=4,endLine=56,endColumn=18,title=Mypy-SomePlatform::trio/package/module.py:(48:4 - 56:18): Missing annotations  [no-untyped-def]
)trio._tools.mypy_annotate_toolsmypy_annotateexistscontextsetattrsysioStringIOr   strr1   r2   r3   )tmp_pathmonkeypatchr4   r=   inp_textresult_filer6   s          r*   test_endtoendrI   g   s   
 65H Z'K!!###				 
C"++h*?@3{+\>J	

 


C77b==77h,K(	)*



C77b==77	*  #
 
s   A	DD)r
   rD   r   zResult | NonereturnNone)r4   pytest.CaptureFixture[str]rJ   rK   )rE   r	   rF   zpytest.MonkeyPatchr4   rL   rJ   rK   )
__future__r   rB   rA   typingr   pytestr;   r   r   r   r   pathlibr	   markparametrizer+   r7   rI    r,   r*   <module>rT      s    " 	 
    H H ":/$	
 M.1	
 5,#		
7$J 	HO  (RS(R
'T%%#% '% 
	%r,   