
    _Og                         S r SSKJr  SSKJr  SSKJr   " S S\R                  5      r " S S\5      r " S	 S
\5      r	g)z+This module contains the RepoComment class.   )models)users)requires_authc                   L    \ rS rSrSrS rS rS r\S 5       r	\S 5       r
\
rSrg)	_RepoComment   a  The :class:`RepoComment <RepoComment>` object.

This stores the information about a comment on a file in a repository.

Two comment instances can be checked like so::

    c1 == c2
    c1 != c2

And is equivalent to::

    c1.id == c2.id
    c1.id != c2.id

c                 Z   US   U l         US   U l        US   U l        US   U l        U R	                  US   5      U l        US   U l        US   U l        US   U l        US	   U l	        US
   U l
        U R	                  US   5      U l        [        R                  " US   U 5      U l        g )Nurlauthor_associationbody	commit_id
created_athtml_urlidlinepathposition
updated_atuser)_apir   r   r   	_strptimer   r   r   r   r   r   r   r   	ShortUserr   )selfcomments     Z/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/github3/repos/comment.py_update_attributes_RepoComment._update_attributes   s    EN	")*>"?FO	 -..)>?
+$-FO	FO	
+..)>?OOGFOT:	    c                     SR                  U R                  U R                  S S U R                  R                  =(       d    S5      $ )Nz<{} [{}/{}]>r    )format
class_namer   r   loginr   s    r   _repr_RepoComment._repr(   s8    $$OOT^^BQ/1FB
 	
r   c                 Z    U R                  U R                  U R                  5      SS5      $ )zcDelete this comment.

:returns:
    True if successfully deleted, False otherwise
:rtype:
    bool
   i  )_boolean_deleter   r$   s    r   delete_RepoComment.delete-   s$     }}T\\$))4c3??r   c                     U(       aE  U R                  U R                  U R                  SU0S9S5      nU(       a  U R                  U5        gg)zEdit this comment.

:param str body:
    (required), new body of the comment, Markdown formatted
:returns:
    True if successful, False otherwise
:rtype:
    bool
r   )json   TF)_json_patchr   r   )r   r   r.   s      r   edit_RepoComment.edit8   sH     ::DIIVTN;SD ''-r   )r   r   r   r   r   r   r   r   r   r   r   r   N)__name__
__module____qualname____firstlineno____doc__r"   r   r%   r   r+   r2   update__static_attributes__ r   r   r   r      sI       J;

 @ @  & Fr   r   c                   0   ^  \ rS rSrSrSrU 4S jrSrU =r$ )RepoCommentO   aL  The representation of the full comment on an object in a repository.

This object has the same attributes as a
:class:`~github3.repos.comment.ShortComment` as well as the following:

.. attribute:: body_html

    The HTML formatted text of this comment.

.. attribute:: body_text

    The plain-text formatted text of this comment.
zRepository Commentc                 L   > [         TU ]  U5        US   U l        US   U l        g )N	body_text	body_html)superr   r@   rA   )r   r   	__class__s     r   r   RepoComment._update_attributes`   s(    "7+ - -r   )rA   r@   )	r4   r5   r6   r7   r8   r"   r   r:   __classcell__)rC   s   @r   r=   r=   O   s     &J. .r   r=   c                        \ rS rSrSrSr\rSrg)ShortCommentf   a]  The representation of an abridged comment on an object in a repo.

This object has the following attributes:

.. attribute:: author_association

    The affiliation the author of this comment has with the repository.

.. attribute:: body

    The Markdown formatted text of this comment.

.. attribute:: commit_id

    The SHA1 associated with this comment.

.. attribute:: created_at

    A :class:`~dateteime.datetime` object representing the date and time
    when this comment was created.

.. attribute:: html_url

    The URL to view this comment in a browser.

.. attribute:: id

    The unique identifier of this comment.

.. attribute:: line

    The line number where the comment is located.

.. attribute:: path

    The path to the file where this comment was made.

.. attribute:: position

    The position in the diff where the comment was left.

.. attribute:: updated_at

    A :class:`~datetime.datetime` object representing the date and time
    when this comment was most recently updated.

.. attribute:: user

    A :class:`~github3.users.ShortUser` representing the author of this
    comment.
zShort Repository Commentr;   N)	r4   r5   r6   r7   r8   r"   r=   _refresh_tor:   r;   r   r   rG   rG   f   s    2h ,JKr   rG   N)
r8   r    r   r   
decoratorsr   
GitHubCorer   r=   rG   r;   r   r   <module>rL      s>    1   &E6$$ EP., ..6< 6r   