+
    LV-j…-  ã                   óX   € ^ RI t ^ RIt^ RIt^RIHt ^RIHt ^RIHt  ! R R]4      t	R# )é    N)ÚAbstractFileSystem©Úinfer_storage_options)Ú
MemoryFilec                   óü   a a€ ] tR t^t oRtRtRtRtRtRV 3R llt	]
R 4       t]RR l4       t]
R 4       t]
R	 4       t]
R
 4       tRR ltRR lt]V 3R l4       t]R 4       tRR ltRR ltRR ltR tRtVtV ;t# )ÚGithubFileSystemaJ  Interface to files in github

An instance of this class provides the files residing within a remote github
repository. You may specify a point in the repos history, by SHA, branch
or tag (default is current master).

For files less than 1 MB in size, file content is returned directly in a
MemoryFile. For larger files, or for files tracked by git-lfs, file content
is returned as an HTTPFile wrapping the ``download_url`` provided by the
GitHub API.

When using fsspec.open, allows URIs of the form:

- "github://path/file", in which case you must specify org, repo and
  may specify sha in the extra args
- 'github://org:repo@/precip/catalog.yml', where the org and repo are
  part of the URI
- 'github://org:repo@sha/precip/catalog.yml', where the sha is also included

``sha`` can be the full or abbreviated hex of the commit you want to fetch
from, or a branch or tag name (so long as it doesn't contain special characters
like "/", "?", which would have to be HTTP-encoded).

For authorised access, you must provide username and token, which can be made
at https://github.com/settings/tokens
z9https://api.github.com/repos/{org}/{repo}/git/trees/{sha}zChttps://api.github.com/repos/{org}/{repo}/contents/{path}?ref={sha}Úgithubc                ó  <€ \         SV `  ! R/ VB  Wn        W n        VR J VR J ,          '       d   \	        R4      hW@n        WPn        Ve   W`n        Vfg   Rp\        P                  ! VP                  WR7      3RV P                  /V P                  B p	V	P                  4        V	P                  4       R,          pY0n        V P                  R4        ^RIHp
 V
! R/ VB V n        R #   \&         d    R T n         R # i ; i)	Nz%Auth required both username and tokenz)https://api.github.com/repos/{org}/{repo})ÚorgÚrepoÚtimeoutÚdefault_branchÚ )ÚHTTPFileSystem© )ÚsuperÚ__init__r   r   Ú
ValueErrorÚusernameÚtokenr   ÚrequestsÚgetÚformatÚkwÚraise_for_statusÚjsonÚrootÚlsÚhttpr   Úhttp_fsÚImportError)Úselfr   r   Úshar   r   r   ÚkwargsÚuÚrr   Ú	__class__s   &&&&&&&,   €Ún/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/fsspec/implementations/github.pyr   ÚGithubFileSystem.__init__,   sî   ø€ ô 	‰ÒÑ"˜6Ò"ØŒØŒ	Ø˜Ð ¨$ ×/Ô/ÜÐDÓEÐEØ ŒØŒ
ØÒØ"ŒLØŠ;à;ˆAÜ—’Ø—‘˜S�Ó,ñØ6:·l±lðØFJÇgÁgñˆAð ×ÑÔ Ø—&‘&“(Ð+Õ,ˆCàŒ	Ø�‰�Œð	 Ý,á)Ñ3¨FÑ3ˆDŽLøÜô 	 ØˆD�Lð	 ús   ÃC) Ã)C?Ã>C?c                ó^   € V P                   '       d   R V P                   V P                  3/# / # )Úauth)r   r   ©r"   s   &r(   r   ÚGithubFileSystem.kwJ   s(   € à�=�=ˆ=Ø˜TŸ]™]¨D¯J©JÐ7Ð8Ð8Øˆ	ó    c                óÜ   € \         P                  ! RRR.V,           RV R2V P                  R7      pVP                  4        VP	                  4        Uu. uF  qDR,          NK  	  up# u upi )a  List repo names for given org or user

This may become the top level of the FS

Parameters
----------
org_or_user: str
    Name of the github org or user to query
is_org: bool (default True)
    Whether the name is an organisation (True) or user (False)

Returns
-------
List of string
zhttps://api.github.com/ÚusersÚorgsÚ/z/repos)r   Úname)r   r   r   r   r   )ÚclsÚorg_or_userÚis_orgr&   r   s   &&&  r(   ÚreposÚGithubFileSystem.reposP   sf   € ô" �LŠLØ% w°Ð&7¸Õ&?Ð%@ÀÀ+ÀÈfÐUØ—K‘Kô
ˆð 	
×ÑÔØ)*¯©¬Ó2© �V—�©Ñ2Ð2ùÒ2s   ÁA)c                ó  € \         P                  ! RV P                   RV P                   R23RV P                  /V P
                  B pVP                  4        VP                  4        Uu. uF  q"R,          NK  	  up# u upi )zNames of tags in the repoúhttps://api.github.com/repos/r2   z/tagsr   r3   ©r   r   r   r   r   r   r   r   ©r"   r&   Úts   &  r(   ÚtagsÚGithubFileSystem.tagsh   sv   € ô �LŠLØ+¨D¯H©H¨:°Q°t·y±y°kÀÐGñ
à—L‘Lð
ð �g‰gñ
ˆð
 	
×ÑÔØ#$§6¡6¤8Ó,¡8˜a�&—	�	¡8Ñ,Ð,ùÒ,ó   Á+A?c                ó  € \         P                  ! RV P                   RV P                   R23RV P                  /V P
                  B pVP                  4        VP                  4        Uu. uF  q"R,          NK  	  up# u upi )zNames of branches in the repor:   r2   z	/branchesr   r3   r;   r<   s   &  r(   ÚbranchesÚGithubFileSystem.branchess   sv   € ô �LŠLØ+¨D¯H©H¨:°Q°t·y±y°kÀÐKñ
à—L‘Lð
ð �g‰gñ
ˆð
 	
×ÑÔØ#$§6¡6¤8Ó,¡8˜a�&—	�	¡8Ñ,Ð,ùÒ,r@   c                ó6   € RV P                   RV P                  /# )z#Named references, tags and branchesr>   rB   )r>   rB   r,   s   &r(   ÚrefsÚGithubFileSystem.refs~   s   € ð ˜Ÿ	™	 :¨t¯}©}Ð=Ð=r.   c                ól  € V P                  V4      pVR8X  d   T;'       g    V P                  pVfÓ   VP                  R4      P                  R4      pRpT;'       g    V P                  pV F”  pV P	                  VRW4R7      p	Yw'       d
   RV,           MT,          pV	 U
u. uF  qªR,          V8X  g   K  V
NK  	  p	p
V	'       g   \        V4      hV	^ ,          p	V	R,          R8X  d   V'       d   V	.u # Vu # V	R	,          pK–  	  WP                  9  g   W0P                  R39  EdB   \        P                  ! V P                  P                  V P                  V P                  VR
7      3RV P                  /V P                  B pVP                  R8X  d   \        V4      hVP!                  4        RRRR/pVP#                  4       R,           Uu. uFp  pVR,          V9   g   K  RV'       d   VR,           VR,          ,           MVR,          RVR,          RWÍR,          ,          RVP                  R^ 4      R	VR	,          /NKr  	  p	pW0P                  R39   d   W�P                  V&   MV P                  V,          p	V'       d   V	# \%        V	 Uu. uF  qÝR,          NK  	  up4      # u up
i u upi u upi )a¡  List files at given path

Parameters
----------
path: str
    Location to list, relative to repo root
detail: bool
    If True, returns list of dicts, one per file; if False, returns
    list of full filenames only
sha: str (optional)
    List at the given point in the repo history, branch or tag name or commit
    SHA
_sha: str (optional)
    List this specific tree object (used internally to descend into trees)
r   Nr2   T)r#   Ú_shar3   ÚtypeÚfiler#   )r   r   r#   r   é”  ÚblobÚtreeÚ	directoryÚpathÚmodeÚsize)Ú_strip_protocolr   ÚrstripÚsplitr   ÚFileNotFoundErrorÚdircacher   r   Úurlr   r   r   r   r   Ústatus_coder   r   Úsorted)r"   rO   Údetailr#   rH   r$   ÚpartsÚso_farÚpartÚoutÚor&   ÚtypesÚfs   &&&&&,        r(   r   ÚGithubFileSystem.lsƒ   si  € ð  ×#Ñ# DÓ)ˆØ�2Œ:Ø×#Ð#˜$Ÿ)™)ˆDØŠ<Ø—K‘K Ó$×*Ñ*¨3Ó/ˆEØˆFØ×#Ð#˜$Ÿ)™)ˆDÛ�Ø—g‘g˜f d°�gÓ?�Ø®˜# ž*°DÕ8�Ù"%Ó=¡#˜Q¨6­°fÑ)<—q�q¡#�Ð=ßÜ+¨DÓ1Ð1Ø˜!•f�Ø�v•; &Ô(ßØ #˜ušà#šØ˜5•z’ñ ð —}‘}Ô$¨·I±I¸tÐ3DÕ(DÜ—’Ø—‘—‘ D§H¡H°4·9±9À$�ÓGñàŸ™ðð —'‘'ñˆAð
 �}‰} Ô#Ü'¨Ó-Ð-Ø×ÑÔ Ø˜V V¨[Ð9ˆEð Ÿ™› &Ö)ó
ñ *�AØ�V•9 Ñ%ôØ·d˜D 3�J¨¨6­Ö2ÀÀ&Å	Ø˜A˜f�IØ˜E F¥)Õ,Ø˜AŸE™E &¨!Ó,Ø˜1˜U�8óñ *ð ð 
ð —y‘y $Ð'Ô'Ø&)—‘˜dÑ#øà—-‘- Õ%ˆCßØˆJä©cÓ2©c¨˜VŸ9˜9©cÑ2Ó3Ð3ùòM >ùò(
ùò$ 3s%   Â!J'Â5J'ÇJ,Ç%J,Ç.AJ,ÊJ1c                ó:   € V P                   P                  4        R # ©N)rV   Úclear)r"   rO   s   &&r(   Úinvalidate_cacheÚ!GithubFileSystem.invalidate_cacheÅ   s   € Ø�‰×ÑÖr.   c                óv   <€ \        V4      pR V9  d   \        SV `	  V4      # VR,          P                  R4      # )r   rO   r2   )r   r   rR   Úlstrip)r4   rO   Úoptsr'   s   && €r(   rR   Ú GithubFileSystem._strip_protocolÈ   s:   ø€ ä$ TÓ*ˆØ˜TÔ!Ü‘7Ñ*¨4Ó0Ð0Ø�F�|×"Ñ" 3Ó'Ð'r.   c                óŒ   € \        V 4      pR V9  d   / # RVR ,          RVR,          /pVR,          '       d   VR,          VR&   V# )r   r   r   ÚpasswordÚhostr#   r   )rO   rj   r^   s   &  r(   Ú_get_kwargs_from_urlsÚ&GithubFileSystem._get_kwargs_from_urlsÏ   sL   € ä$ TÓ*ˆØ˜TÔ!ØˆIØ�d˜:Õ&¨°°ZÕ0@ÐAˆØ��<Œ<Ø˜f�ˆC�‰JØˆ
r.   c           	     ó   € VR 8w  d   \         hV P                  P                  V P                  V P                  Y;'       g    V P
                  R7      p\        P                  ! V3RV P                  /V P                  B pVP                  R8X  d   \        V4      hVP                  4        VP                  4       p	V	R,          '       dB   \        P                  ! V	R,          4      p
V
P!                  R4      '       g   \#        RRV
4      # V P$                  f   \'        R4      hV P$                  P(                  ! V	R,          3R	VR
VRV/VB # )Úrb©r   r   rO   r#   r   rK   Úcontents#   version https://git-lfs.github.com/NzRPlease install fsspec[http] to access github files >1 MB or git-lfs tracked files.Údownload_urlrP   Ú
block_sizeÚcache_options)ÚNotImplementedErrorÚcontent_urlr   r   r   r   r   r   r   r   rX   rU   r   r   Úbase64Ú	b64decodeÚ
startswithr   r    r!   Úopen)r"   rO   rP   rv   rw   r#   r$   rW   r&   Úcontent_jsonrt   s   &&&&&&,    r(   Ú_openÚGithubFileSystem._openÙ   sC  € ð �4Œ<Ü%Ð%ð ×Ñ×%Ñ%Ø—‘˜tŸy™y¨t×9IÐ9IÀÇ	Á	ð &ó 
ˆô
 �LŠL˜Ñ> d§l¡lÐ>°d·g±gÑ>ˆØ�=‰=˜CÔÜ# DÓ)Ð)Ø	×ÑÔØ—v‘v“xˆð ˜	×"Ô"Ü×&Ò& |°IÕ'>Ó?ˆGð ×%Ñ%Ð&L×MÒMÜ! $¨¨gÓ6Ð6ð
 �<‰<ÒÜð,óð ð �|‰|× Ò Ø˜Õ(ñ
àð
ð "ð
ð (ð	
ð
 ñ
ð 	
r.   c                ót   € V P                  WVR 7      p\        V4       F  pV P                  WTR7       K  	  R# ))Ú	recursiveÚmaxdepth)ÚmessageN)Úexpand_pathÚreversedÚrm_file)r"   rO   r‚   rƒ   r„   Úps   &&&&& r(   ÚrmÚGithubFileSystem.rm  s3   € Ø×Ñ ÀHÐÓMˆÜ˜$–ˆAØ�L‰L˜ˆLÖ,ó  r.   c                ó  € V P                   '       g   \        R4      hV P                  V4      pV P                  V4      pV'       g½   V P                  P                  V P                  V P                  VP                  R4      V P                  R7      p\        P                  ! V3RV P                  /V P                  B pVP                  R8X  d   \        V4      hVP!                  4        VP#                  4       R,          pV P                  P                  V P                  V P                  WP                  R7      pV P                  pRT;'       g    RV 2RV/V'       d   R	V/M/ Cp	\        P$                  ! V3R
V	RV P                  /V P                  B pVP#                  4       P                  RR4      p
\&        P(                  ! RV
4      '       d   Rp\        V4      hVP!                  4        V P+                  V4       R# )a÷  
Remove a file from a specified branch using a given commit message.

Since Github DELETE operation requires a branch name, and we can't reliably
determine whether the provided SHA refers to a branch, tag, or commit, we
assume it's a branch. If it's not, the user will encounter an error when
attempting to retrieve the file SHA or delete the file.

Parameters
----------
path: str
    The file's location relative to the repository root.
message: str, optional
    The commit message for the deletion.
zAuthentication requiredr2   rs   r   rK   r#   r„   zDelete Úbranchr   r   zBranch .+ not foundzTRemove only works when the filesystem is initialised from a branch or default (None)N)r   r   rR   Ú_get_sha_from_cachery   r   r   r   ri   r   r   r   r   r   rX   rU   r   r   ÚdeleteÚreÚsearchrf   )r"   rO   r„   r$   r#   rW   r&   Ú
delete_urlrŒ   ÚdataÚerror_messageÚerrors   &&&,        r(   r‡   ÚGithubFileSystem.rm_file  s²  € ð" �}�}ˆ}ÜÐ6Ó7Ð7à×#Ñ# DÓ)ˆð ×&Ñ& tÓ,ˆßØ×"Ñ"×)Ñ)Ø—H‘H 4§9¡9°4·;±;¸sÓ3CÈÏÉð *ó ˆCô —’˜SÑB¨$¯,©,ÐB¸$¿'¹'ÑBˆAØ�}‰} Ô#Ü'¨Ó-Ð-Ø×ÑÔ Ø—&‘&“(˜5•/ˆCð ×%Ñ%×,Ñ,Ø—‘˜tŸy™y¨t¿¹ð -ó 
ˆ
ð —‘ˆà�w×2Ð2 G¨D¨6Ð"2Ø�3ð
÷ &,�˜&Ñ!°ð
ˆô �OŠO˜JÑS¨TÐS¸4¿<¹<ÐSÈ4Ï7É7ÑSˆØŸ™›Ÿ™ Y°Ó3ˆÜ�9Š9Ð+¨]×;Ò;ØjˆEÜ˜UÓ#Ð#Ø	×ÑÔà×Ñ˜dÖ#r.   c                óÈ   € V P                   P                  4        FC  pV F:  pVP                  R 4      pV'       g   K  WA8X  g   K&  RV9   g   K/  VR,          u u # 	  KE  	  R# )r3   r#   N)rV   Úvaluesr   )r"   rO   ÚentriesÚentryÚ
entry_paths   &&   r(   r�   Ú$GithubFileSystem._get_sha_from_cacheG  sP   € Ø—}‘}×+Ñ+Ö-ˆGÛ �Ø"ŸY™Y vÓ.�
ß‘: *Ö"4¸À%¾Ø  �<Ô'ó !ñ .ñ
 r.   )r    r   r   r   r   r   r   )é<   rœ   )NNNN)T)FNNrd   )rr   NNN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rW   ry   Úprotocolr   r   Úpropertyr   Úclassmethodr7   r>   rB   rE   r   rf   rR   Ústaticmethodro   r   r‰   r‡   r�   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r'   Ú__classdict__s   @@r(   r   r      sÙ   ù‡ € ñð6 F€CØW€KØ€HØ€G÷ ð< ñó ðð
 ó3ó ð3ð. ñ-ó ð-ð ñ-ó ð-ð ñ>ó ð>ô@4ôDð ô(ó ð(ð ñó ðô1
ôf-ô
4$÷lò r.   r   )
rz   r�   r   Úspecr   Úutilsr   Úmemoryr   r   r   r.   r(   Ú<module>r­      s&   ðÛ Û 	ã å %Ý )Ý ôBÐ)ö Br.   