+
    "il                        R t ^ RIHt ^ RIHt ^RIHtHt ^RIH	t	 ^RI
Ht ^RIHt ]'       d   ^RIHt  ! R R	]4      tR
# )z!Class for python_scripts in HACS.)annotations)TYPE_CHECKING)HacsCategoryHacsDispatchEvent)HacsException)
concurrent)HacsRepository)HacsBasec                     a  ] tR t^tRtRtR V 3R llt]R 4       tR t	R t
]! ^
^R7      RR	 l4       tR
 R ltRtV ;t# )HacsPythonScriptRepositoryzpython_scripts in HACS.python_scriptc                    V ^8  d   QhRRRR/# )   hacsr	   	full_namestr )formats   "</config/custom_components/hacs/repositories/python_script.py__annotate__'HacsPythonScriptRepository.__annotate__   s     # #X ## #    c                f  < \         SV `  VR7       W P                  n        VP	                  4       V P                  n        \        P                  V P                  n        RV P                  P                  n        V P                  V P                  P                  n        RV P                  n        R# )zInitialize.)r   python_scriptsTN)super__init__datar   lowerfull_name_lowerr   PYTHON_SCRIPTcategorycontentpathremote	localpathlocalsingle)selfr   r   	__class__s   &&&r   r   #HacsPythonScriptRepository.__init__   sv    d#'		$-OO$5		!)77		#3 "&.."r   c                H    V P                   P                  P                   R2# )zReturn localpath.z/python_scripts)r   coreconfig_pathr'   s   &r   r$   $HacsPythonScriptRepository.localpath   s      ))..,,-_==r   c                4  "   V P                  4       G Rj  xL
  V P                  P                  '       d   RV P                  P                  n        RpV P                   FV  pVP                  V P                  P                  P
                   4      '       g   K;  VP                  R4      '       g   KT  Rp M	  V'       g6   \        V P                   RV P                  P                  RR4       R24      hV P                  P                  '       dm   V P                  P                   FR  pV P                  P                   P"                  '       d   K+  V P$                  P'                  R	V P                  V4       KT  	  V P                  P(                  #  EL5i)
z	Validate.N F.pyT Repository structure for tags/ is not compliantz%s %s)common_validaterepository_manifestcontent_in_rootr!   r"   r#   	treefiles
startswithendswithr   stringrefreplacevalidateerrorsr   statusstartuploggererrorsuccess)r'   	complianttreefilerC   s   &   r   validate_repository.HacsPythonScriptRepository.validate_repository$   s7     ""$$$ ##333')DLL$	H""dll&7&7&>&>%?AAhFWFWX]F^F^ 	 ' ;;-9$((:J:J7SU:V9WWhi 
 ==--yy''///KK%%gt{{EB . }}$$$+ 	%s5   FFFAFF4FAF<FAFc                   "   V P                  4        V P                  P                  P                  '       d0   V P                  P                  P                  V 4      G Rj  xL
  R# R#  L5i)zRegistration.N)update_filenamesr   systemaction
validationasync_run_repository_checksr-   s   &r   async_post_registration2HacsPythonScriptRepository.async_post_registration>   sO      	99"""))&&BB4HHH #Hs   AA,!A*"	A,)concurrenttasksbackoff_timec                .  "   V P                  W4      G Rj  xL
 '       g   V'       g   R# V P                  P                  '       d   RV P                  P                  n        RpV P                   FV  pVP                  V P                  P                  P
                   4      '       g   K;  VP                  R4      '       g   KT  Rp M	  V'       g6   \        V P                   RV P                  P                  RR4       R24      hV P                  4        V P                  P                  '       d]   V P                   P#                  \$        P&                  R	R
RRRV P                  P(                  RV P                  P*                  /4       R# R#  EL{5i)zUpdate.Nr0   Fr1   Tr2   r3   r4   idi9  rL   update
repositoryrepository_id)common_updater6   r7   r!   r"   r#   r8   r9   r:   r   r;   r<   r=   rJ   r   	installedr   async_dispatchr   
REPOSITORYr   rT   )r'   ignore_issuesforcerE   rF   s   &&&  r   update_repository,HacsPythonScriptRepository.update_repositoryF   sA     ''===e ##333')DLL$	H""dll&7&7&>&>%?AAhFWFWX]F^F^ 	 ' ;;-9$((:J:J7SU:V9WWhi 
 	 99II$$!,,$h $))"5"5#TYY\\	 + >s:   FF	FFFAF,FFA F4AFc                   V ^8  d   QhRR/# )r   returnNoner   )r   s   "r   r   r   i   s     8 8$ 8r   c                *   V P                    F  pVP                  P                  V P                  P                  P
                  4      '       g   KD  VP                  P                  R4      '       g   Kg  VP                  V P                  n	        K  	  R# )zGet the filename to target.r1   N)
tree	full_pathr9   r!   r"   r#   r:   filenamer   	file_name)r'   rF   s   & r   rJ   +HacsPythonScriptRepository.update_filenamesi   se    		H!!,,!!(( $$--e44&.&7&7		#	 "r   r   )FF)__name__
__module____qualname____firstlineno____doc__r    r   propertyr$   rG   rO   r   r^   rJ   __static_attributes____classcell__)r(   s   @r   r   r      sZ    !H# # > >%4I 3  4 D8 8r   r   N)rm   
__future__r   typingr   enumsr   r   
exceptionsr   utils.decoratorr   baser   r	   r   r   r   r   <module>rw      s.    ' "   3 & (  _8 _8r   