+
    QV-j%0  ã                   óZ  € 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,          t] ! R R4      4       t] ! R R	]4      4       t ! R
 R]4      t] ! R R4      4       t] ! R R]4      4       t] ! R R]4      4       t] ! R R]4      4       t] ! R R]4      4       tR R ltR# )a  
Data structures to interact with Discussions and Pull Requests on the Hub.

See [the Discussions and Pull Requests guide](https://huggingface.co/docs/hub/repositories-pull-requests-discussions)
for more information on Pull Requests, Discussions, and the community tab.
)Ú	dataclass©Údatetime)ÚLiteralÚ	TypedDict)Ú	constants)Úparse_datetimec                   óh   a € ] tR t^t o Rt]V 3R lR l4       t]V 3R lR l4       tV 3R ltRt	V t
R# )	Ú
Discussiona•  
A Discussion or Pull Request on the Hub.

This dataclass is not intended to be instantiated directly.

Attributes:
    title (`str`):
        The title of the Discussion / Pull Request
    status (`str`):
        The status of the Discussion / Pull Request.
        It must be one of:
            * `"open"`
            * `"closed"`
            * `"merged"` (only for Pull Requests )
            * `"draft"` (only for Pull Requests )
    num (`int`):
        The number of the Discussion / Pull Request.
    repo_id (`str`):
        The id (`"{namespace}/{repo_name}"`) of the repo on which
        the Discussion / Pull Request was open.
    repo_type (`str`):
        The type of the repo on which the Discussion / Pull Request was open.
        Possible values are: `"model"`, `"dataset"`, `"space"`.
    author (`str`):
        The username of the Discussion / Pull Request author.
        Can be `"deleted"` if the user has been deleted since.
    is_pull_request (`bool`):
        Whether or not this is a Pull Request.
    created_at (`datetime`):
        The `datetime` of creation of the Discussion / Pull Request.
    endpoint (`str`):
        Endpoint of the Hub. Default is https://huggingface.co.
    git_reference (`str`, *optional*):
        (property) Git reference to which changes can be pushed if this is a Pull Request, `None` otherwise.
    url (`str`):
        (property) URL of the discussion on the Hub.
c                ó.   <€ V ^8„  d   QhRS[ R,          /# )é   ÚreturnN©Ústr)ÚformatÚ__classdict__s   "€Új/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/huggingface_hub/community.pyÚ__annotate__ÚDiscussion.__annotate__F   s   ø€ ÷ ñ ™s T�zñ ó    c                óH   € V P                   '       d   RV P                   2# R# )zq
If this is a Pull Request , returns the git reference to which changes can be pushed.
Returns `None` otherwise.
zrefs/pr/N)Úis_pull_requestÚnum©Úselfs   &r   Úgit_referenceÚDiscussion.git_referenceE   s$   € ð ××ÐØ˜dŸh™h˜ZÐ(Ð(Ùr   c                ó    <€ V ^8„  d   QhRS[ /# ©r   r   r   )r   r   s   "€r   r   r   P   s   ø€ ÷ Zñ Z‘Sñ Zr   c                ó  € V P                   e    V P                   \        P                  8X  d)   V P                   RV P                   RV P
                   2# V P                   RV P                    RV P                   RV P
                   2# )z-Returns the URL of the discussion on the Hub.Ú/z/discussions/zs/)Ú	repo_typer   ÚREPO_TYPE_MODELÚendpointÚrepo_idr   r   s   &r   ÚurlÚDiscussion.urlO   sp   € ð �>‰>Ò! T§^¡^´y×7PÑ7PÔ%PØ—m‘m�_ A d§l¡l ^°=ÀÇÁÀ
ÐKÐKØ—-‘-�  $§.¡.Ð!1°°D·L±L°>ÀÈtÏxÉxÈjÐYÐYr   c                ó†   <€ V ^8„  d   Qh/ S[ ;R&   S[;R&   S[;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[;R&   S[ ;R	&   # )
r   ÚtitleÚstatusr   r$   r!   Úauthorr   Ú
created_atr#   )r   ÚDiscussionStatusÚintÚboolr   )r   r   s   "€r   r   r      s†   ø‡ ‚ ñP �JñQ ñR ÑñS ñT 
�HñU ñV �LñW ñX �NñY ñZ �Kñ[ ñ\ Ññ] ñ^ Ññ_ ñ` �Mòa r   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úpropertyr   r%   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©r   s   @r   r
   r
      s=   ø‡ € ñ$ð` ÷ó ðð ÷Zó ðZ÷{ ƒ r   r
   c                   ó0   a € ] tR t^Wt o RtV 3R ltRtV tR# )ÚDiscussionWithDetailsa{  
Subclass of [`Discussion`].

Attributes:
    title (`str`):
        The title of the Discussion / Pull Request
    status (`str`):
        The status of the Discussion / Pull Request.
        It can be one of:
            * `"open"`
            * `"closed"`
            * `"merged"` (only for Pull Requests )
            * `"draft"` (only for Pull Requests )
    num (`int`):
        The number of the Discussion / Pull Request.
    repo_id (`str`):
        The id (`"{namespace}/{repo_name}"`) of the repo on which
        the Discussion / Pull Request was open.
    repo_type (`str`):
        The type of the repo on which the Discussion / Pull Request was open.
        Possible values are: `"model"`, `"dataset"`, `"space"`.
    author (`str`):
        The username of the Discussion / Pull Request author.
        Can be `"deleted"` if the user has been deleted since.
    is_pull_request (`bool`):
        Whether or not this is a Pull Request.
    created_at (`datetime`):
        The `datetime` of creation of the Discussion / Pull Request.
    events (`list` of [`DiscussionEvent`])
        The list of [`DiscussionEvents`] in this Discussion or Pull Request.
    conflicting_files (`Union[list[str], bool, None]`, *optional*):
        A list of conflicting files if this is a Pull Request.
        `None` if `self.is_pull_request` is `False`.
        `True` if there are conflicting files but the list can't be retrieved.
    target_branch (`str`, *optional*):
        The branch into which changes are to be merged if this is a
        Pull Request . `None`  if `self.is_pull_request` is `False`.
    merge_commit_oid (`str`, *optional*):
        If this is a merged Pull Request , this is set to the OID / SHA of
        the merge commit, `None` otherwise.
    diff (`str`, *optional*):
        The git diff if this is a Pull Request , `None` otherwise.
    endpoint (`str`):
        Endpoint of the Hub. Default is https://huggingface.co.
    git_reference (`str`, *optional*):
        (property) Git reference to which changes can be pushed if this is a Pull Request, `None` otherwise.
    url (`str`):
        (property) URL of the discussion on the Hub.
c                ó¼   <€ V ^8„  d   Qh/ S[ R,          ;R&   S[ S[,          S[,          R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   # )r   ÚDiscussionEventÚeventsNÚconflicting_filesÚtarget_branchÚmerge_commit_oidÚdiff)Úlistr   r.   )r   r   s   "€r   r   Ú"DiscussionWithDetails.__annotate__W   sp   ø‡ ‚ ñh Ð"Õ#Ñ#ñi ñj ™C•y¡4Õ'¨$Õ.Ñ.ñk ñl ˜•:Ññm ñn ˜D•jÑ ño ñp ��*Ñòq r   r/   N©r0   r1   r2   r3   r4   r6   r7   r8   r9   s   @r   r;   r;   W   s   ø‡ € ñ0÷ ƒ r   r;   c                   ó,   a € ] tR t^’t o V 3R ltRtV tR# )ÚDiscussionEventArgsc                óV   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[;R&   S[ ;R&   S[;R&   # ©r   ÚidÚtyper+   r*   Ú_event©r   r   Údict)r   r   s   "€r   r   Ú DiscussionEventArgs.__annotate__’   s>   ø‡ ‚ Ù�Gñ á
�Iñ ñ Ññ ñ �Kñ	 ñ
 �Lò r   r/   N)r0   r1   r2   r3   r6   r7   r8   r9   s   @r   rG   rG   ’   s   ø‡ ‡ „ r   rG   c                   ó2   a € ] tR t^št o Rt V 3R ltRtV tR# )r=   a”  
An event in a Discussion or Pull Request.

Use concrete classes:
    * [`DiscussionComment`]
    * [`DiscussionStatusChange`]
    * [`DiscussionCommit`]
    * [`DiscussionTitleChange`]

Attributes:
    id (`str`):
        The ID of the event. An hexadecimal string.
    type (`str`):
        The type of the event.
    created_at (`datetime`):
        A [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime)
        object holding the creation timestamp for the event.
    author (`str`):
        The username of the Discussion / Pull Request author.
        Can be `"deleted"` if the user has been deleted since.
c                óV   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[;R&   S[ ;R&   S[;R&   # rI   rM   )r   r   s   "€r   r   ÚDiscussionEvent.__annotate__š   sB   ø‡ ‚ ñ0 	�Gñ1 ñ2 �Iñ3 ñ4 Ññ5 ñ6 �Kñ7 ñ: �Lò; r   r/   NrE   r9   s   @r   r=   r=   š   s   ø‡ € ñð8 N÷= ƒ r   r=   c                   ó¼   a € ] tR t^»t o Rt]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR	 l4       t	]V 3R
 lR l4       t
V 3R ltRtV tR# )ÚDiscussionCommenta.  A comment in a Discussion / Pull Request.

Subclass of [`DiscussionEvent`].


Attributes:
    id (`str`):
        The ID of the event. An hexadecimal string.
    type (`str`):
        The type of the event.
    created_at (`datetime`):
        A [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime)
        object holding the creation timestamp for the event.
    author (`str`):
        The username of the Discussion / Pull Request author.
        Can be `"deleted"` if the user has been deleted since.
    content (`str`):
        The raw markdown content of the comment. Mentions, links and images are not rendered.
    edited (`bool`):
        Whether or not this comment has been edited.
    hidden (`bool`):
        Whether or not this comment has been hidden.
c                ó    <€ V ^8„  d   QhRS[ /# r   r   )r   r   s   "€r   r   ÚDiscussionComment.__annotate__Ú   s   ø€ ÷ 5ñ 5™#ñ 5r   c                óD   € V P                   R,          R,          R,          # )z&The rendered comment, as a HTML stringÚdataÚlatestÚhtml©rL   r   s   &r   ÚrenderedÚDiscussionComment.renderedÙ   s   € ð �{‰{˜6Õ" 8Õ,¨VÕ4Ð4r   c                ó    <€ V ^8„  d   QhRS[ /# r   r   )r   r   s   "€r   r   rV   ß   s   ø€ ÷ Jñ J¡ñ Jr   c                óV   € \        V P                  R,          R,          R,          4      # )ú+The last edit time, as a `datetime` object.rX   rY   Ú	updatedAt)r   rL   r   s   &r   Úlast_edited_atÚ DiscussionComment.last_edited_atÞ   s"   € ô ˜dŸk™k¨&Õ1°(Õ;¸KÕHÓIÐIr   c                ó    <€ V ^8„  d   QhRS[ /# r   r   )r   r   s   "€r   r   rV   ä   s   ø€ ÷ Vñ V¡ñ Vr   c                óv   € V P                   R,          R,          P                  R/ 4      P                  RR4      # )r`   rX   rY   r*   ÚnameÚdeleted)rL   Úgetr   s   &r   Úlast_edited_byÚ DiscussionComment.last_edited_byã   s2   € ð �{‰{˜6Õ" 8Õ,×0Ñ0°¸2Ó>×BÑBÀ6È9ÓUÐUr   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# r   )rC   rN   )r   r   s   "€r   r   rV   é   s   ø€ ÷ .ñ .™d¡4�jñ .r   c                ó6   € V P                   R,          R,          # )zThe edit history of the commentrX   Úhistoryr[   r   s   &r   Úedit_historyÚDiscussionComment.edit_historyè   s   € ð �{‰{˜6Õ" 9Õ-Ð-r   c                ó    <€ V ^8„  d   QhRS[ /# r   )r-   )r   r   s   "€r   r   rV   î   s   ø€ ÷ &ñ &¡ñ &r   c                ó,   € \        V P                  4      # )N)Úlenrn   r   s   &r   Únumber_of_editsÚ!DiscussionComment.number_of_editsí   s   € ä�4×$Ñ$Ó%Ð%r   c                ó>   <€ V ^8„  d   Qh/ S[ ;R&   S[;R&   S[;R&   # )r   ÚcontentÚeditedÚhidden)r   r.   )r   r   s   "€r   r   rV   »   s)   ø‡ ‚ ñ4 �Lñ5 ñ6 �Lñ7 ñ8 �Lò9 r   r/   N)r0   r1   r2   r3   r4   r5   r\   rb   ri   rn   rs   r6   r7   r8   r9   s   @r   rT   rT   »   sz   ø‡ € ñð8 ÷5ó ð5ð ÷Jó ðJð ÷Vó ðVð ÷.ó ð.ð ÷&ó ð&÷g ƒ r   rT   c                   ó0   a € ] tR t^òt o RtV 3R ltRtV tR# )ÚDiscussionStatusChangea
  A change of status in a Discussion / Pull Request.

Subclass of [`DiscussionEvent`].

Attributes:
    id (`str`):
        The ID of the event. An hexadecimal string.
    type (`str`):
        The type of the event.
    created_at (`datetime`):
        A [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime)
        object holding the creation timestamp for the event.
    author (`str`):
        The username of the Discussion / Pull Request author.
        Can be `"deleted"` if the user has been deleted since.
    new_status (`str`):
        The status of the Discussion / Pull Request after the change.
        It can be one of:
            * `"open"`
            * `"closed"`
            * `"merged"` (only for Pull Requests )
c                ó&   <€ V ^8„  d   Qh/ S[ ;R&   # )r   Ú
new_statusr   )r   r   s   "€r   r   Ú#DiscussionStatusChange.__annotate__ò   s   ø‡ ‚ ñ2 �Oò3 r   r/   NrE   r9   s   @r   rz   rz   ò   s   ø‡ € ñ÷ ƒ r   rz   c                   ó0   a € ] tR tRt o RtV 3R ltRtV tR# )ÚDiscussionCommiti  aŸ  A commit in a Pull Request.

Subclass of [`DiscussionEvent`].

Attributes:
    id (`str`):
        The ID of the event. An hexadecimal string.
    type (`str`):
        The type of the event.
    created_at (`datetime`):
        A [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime)
        object holding the creation timestamp for the event.
    author (`str`):
        The username of the Discussion / Pull Request author.
        Can be `"deleted"` if the user has been deleted since.
    summary (`str`):
        The summary of the commit.
    oid (`str`):
        The OID / SHA of the commit, as a hexadecimal string.
c                ó2   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   # )r   ÚsummaryÚoidr   )r   r   s   "€r   r   ÚDiscussionCommit.__annotate__  s   ø‡ ‚ ñ. �Lñ/ ñ0 
�Hò1 r   r/   NrE   r9   s   @r   r   r     ó   ø‡ € ñ÷ ƒ r   r   c                   ó0   a € ] tR tRt o RtV 3R ltRtV tR# )ÚDiscussionTitleChangei)  a®  A rename event in a Discussion / Pull Request.

Subclass of [`DiscussionEvent`].

Attributes:
    id (`str`):
        The ID of the event. An hexadecimal string.
    type (`str`):
        The type of the event.
    created_at (`datetime`):
        A [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime)
        object holding the creation timestamp for the event.
    author (`str`):
        The username of the Discussion / Pull Request author.
        Can be `"deleted"` if the user has been deleted since.
    old_title (`str`):
        The previous title for the Discussion / Pull Request.
    new_title (`str`):
        The new title.
c                ó2   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   # )r   Ú	old_titleÚ	new_titler   )r   r   s   "€r   r   Ú"DiscussionTitleChange.__annotate__)  s   ø‡ ‚ ñ. �Nñ/ ñ0 �Nò1 r   r/   NrE   r9   s   @r   r†   r†   )  r„   r   r†   c                ó0   € V ^8„  d   QhR\         R\        /# )r   Úeventr   )rN   r=   )r   s   "r   r   r   D  s   € ÷ '*ñ '*œTð '*¤oñ '*r   c                óf  € V R,          pV R,          p\        V R,          4      pRVRVRVRV P                  R/ 4      P                  RR4      RV /pVR	8X  dE   \        R/ VBR
V R,          R
,          RV R,          R,          RV R,          R,          R,          /B # VR8X  d   \        R/ VBRV R,          R,          /B # VR8X  d.   \	        R/ VBRV R,          R,          RV R,          R,          /B # VR8X  d.   \        R/ VBRV R,          R,          RV R,          R,          /B # \        R/ VB # )z.Instantiates a [`DiscussionEvent`] from a dictrJ   rK   Ú	createdAtr+   r*   rf   rg   rL   Úcommentrw   rX   rx   rv   rY   Úrawzstatus-changer|   r)   Úcommitr�   Úsubjectr‚   ztitle-changerˆ   Úfromr‰   Útor/   )r   rh   rT   rz   r   r†   r=   )rŒ   Úevent_idÚ
event_typer+   Úcommon_argss   &    r   Údeserialize_eventr˜   D  s~  € à˜$•K€HØ˜F•m€JÜ  kÕ 2Ó3€Jð 	ˆhØ�
Ø�jØ�%—)‘)˜H bÓ)×-Ñ-¨f°iÓ@Ø�%ð(€Kð �YÔÜ ñ 
Øñ
à˜•= Õ*ð
ð ˜•= Õ*ð
ð ˜&•M (Õ+¨EÕ2ò	
ð 	
ð �_Ô$Ü%ñ 
Øñ
à˜V•} XÕ.ò
ð 	
ð �XÔÜñ 
Øñ
à˜&•M )Õ,ð
ð �f•˜eÕ$ò
ð 	
ð
 �^Ô#Ü$ñ 
Øñ
à˜F•m FÕ+ð
ð ˜F•m DÕ)ò
ð 	
ô Ñ)˜[Ñ)Ð)r   N)ÚopenÚclosedÚmergedÚdraft)r4   Údataclassesr   r   Útypingr   r   Ú r   Úutilsr   r,   r
   r;   rG   r=   rT   rz   r   r†   r˜   r/   r   r   Ú<module>r¡      s   ðñõ "Ý ß %å Ý !ð Ð>Õ?Ð ð ÷@Zð @Zó ð@ZðF ô7˜Jó 7ó ð7ôt˜)ô ð ÷Nð Nó ðNð@ ô3&˜ó 3&ó ð3&ðl ô˜_ó ó ðð6 ô�ó ó ðð4 ô˜Oó ó ð÷4'*r   