
    ig                    H   % S r SSKJr  SSKrSSKJr  SSKJr  SSKJ	r
  \(       a  SSKJr  SSKJrJr  S	\S
'    SSKJr      SS jr      SS jr\S:X  a  \R,                  " 5       R/                  5       r\S-  R3                  5       (       d   e\S-  r\S-  r\R9                  SS9r\" \5       V Vs0 s H&  u  pU R=                  S5      R=                  S5      U_M(     snn r\" \\5      r \RB                  " \"" \ 5      5        gg! \ a	    SSKJr   Nf = fs  snn f )zhSync Requirements - Automatically upgrade test requirements pinned
versions from pre-commit config file.    )annotationsN)Path)TYPE_CHECKING)load)	Generator)CLoaderLoaderztype[_CLoader | _Loader]r	   )r   )r	   c              #     #    [        U [        5      nUS    HD  nSU;  d  SU;  a  M  US   nUR                  SS5      S   nUS   R                  S5      nXE4v   MF     g7f)	z5Yield (name, rev) tuples from pre-commit config file.reposreporev/   vN)	load_yamlr	   rsplitremoveprefix)pre_commit_textpre_commit_configr   urlnamer   s         JC:\des-py\RoboSAPF\venv\Lib\site-packages\trio/_tools/sync_requirements.pyyield_pre_commit_version_datar      sn      "/6:!'*d!26lzz#q!"%5k&&s+i +s   AA!c                   SnU R                  SS9R                  S5      nU R                  SSS9 nU H  nUR                  S5      (       d  SU;  a  UR	                  U5        M2  UR                  SS5      u  pgUR                  5       nS	n	S
U;   a)  UR                  S
S5      u  pUR                  5       nSU	-   n	UR                  U5      n
U
c  UR	                  U5        M  U SU
 U	 3nX:w  a*  U(       d  Sn[        S5        [        U SU SU SU
 35        UR	                  U5        M     SSS5        U$ ! , (       d  f       U$ = f)zaReturn if updated requirements file.

Update requirements file to match versions in version_data.Futf-8encodingTw#z==r   
;z ;Nz5Changed test requirements version to match pre-commitz -> )		read_text
splitlinesopen
startswithwritesplitstripgetprint)requirementsversion_datachanged	old_linesfileliner   restold_versionextraversionnew_lines               r   update_requirementsr7   )   sT    G&&&8CCDII			3		1TDs##t4'7

4 D!,JD**,KEd{%)ZZQ%7")//1u"&&t,G

4 r'5'2H"GQRbT$r'CDJJx 3  
26 N7 
2	16 Ns   C>D99
E__main__LICENSEz.pre-commit-config.yamlztest-requirements.txtr   r   z-mirrorz-pre-commit)r   strreturnz&Generator[tuple[str, str], None, None])r,   r   r-   zdict[str, str]r;   bool)#__doc__
__future__r   syspathlibr   typingr   yamlr   r   collections.abcr   r   _CLoaderr	   _Loader__annotations__ImportErrorr   r7   __name__cwdabsolutesource_rootexists
pre_committest_requirementsr#   r   removesuffixpre_commit_versionsr.   exitint)r   r5   s   00r   <module>rS      sL  ) # 
    ");$$&
+%% % 
%P z((*%%'K )#++----88J#&== **G*<O ;?KKMD 	)$11-@'IK ""35HIGHHS\# u  Ls   D 8-DDD