
    _Og                     J    S r SSKJr  SSKJr   " S S\R                  5      rg)z+This module contains the Comparison object.   )commit   )modelsc                   :    \ rS rSrSrS rS rS rS rS
S jr	S	r
g)
Comparison   a  A representation of a comparison between two or more commit objects.

See also:
http://developer.github.com/v3/repos/commits/#compare-two-commits

This object has the following attributes::

.. attribute:: ahead_by

    The number of commits between the head and base commit.

.. attribute:: base_commit

    A :class:`~github3.repos.commit.ShortCommit` representing the base
    commit in this comparison.

.. attribute:: behind_by

    The number of commits the head commit is behind the base.

.. attribute:: original_commits

    .. versionchanged:: 4.0.0


    A list of :class:`~github3.repos.commit.ShortCommit` objects
    representing up to the first 250 commits in the comparison.

    If a comparison has more than 250 commits, use the commits function
    to iterate over all available commits.

.. attribute:: diff_url

    The URL to retrieve the diff between the head and base commits.

.. attribute:: files

    A list of dictionaries describing each of the modified files in the
    comparison.

.. attribute:: html_url

    The URL to view the comparison in a browser.

.. attribute:: patch_url

    The URL to retrieve the patch-formatted diff of this comparison.

.. attribute:: permalink_url

    The permanent URL to retrieve this comparison.

.. attribute:: status

    Whether the head commit is ahead or behind of base.

.. attribute:: total_commits

    The total number of commits difference.
c                    US   U l         US   U l        [        R                  " US   U 5      U l        US   U l        US   U l        US    Vs/ s H  n[        R                  " X 5      PM     snU l        US   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 l        g s  snf )Nurlahead_bybase_commit	behind_bytotal_commitscommitsdiff_urlfileshtml_url	patch_urlpermalink_urlstatus)_apir   r   ShortCommitr   r   r   original_commitsr   r   r   r   r   r   _uniq)selfcomparecoms      ]/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/github3/repos/comparison.py_update_attributesComparison._update_attributesD   s    EN	
+!--gm.DdK -$_55<Y5G!
5GcFs)5G!
  
+W%

+ -$_5h'**
!
s    Cc                 "    SU R                    S3$ )Nz<Comparison of z	 commits>)r   )r   s    r   _reprComparison._reprU   s     !3!3 4I>>    c                     U R                  U R                  SS0S9nU R                  USS5      (       a  UR                  $ S$ )zcRetrieve the diff for this comparison.

:returns:
    the diff as a bytes object
:rtype:
    bytes
Acceptzapplication/vnd.github.diffheaders     r#   _getr   _booleancontentr   resps     r   diffComparison.diffX   sI     yyII*GH  
  $}}T3<<t||E#Er#   c                     U R                  U R                  SS0S9nU R                  USS5      (       a  UR                  $ S$ )zpRetrieve the patch formatted diff for this commit.

:returns:
    the patch as a bytes object
:rtype:
    bytes
r%   zapplication/vnd.github.patchr&   r(   r)   r#   r*   r.   s     r   patchComparison.patche   sI     yyII*HI  
  $}}T3<<t||E#Er#   Nc                 X    U R                  UU R                  [        R                  SUS9$ )a  Iterate over the commits available for this comparison.

:param int number:
    (optional), Number of assets to return
:param str etag:
    (optional), last ETag header sent
:returns:
    generator of asset objects
:rtype:
    :class:`~github3.repos.commit.ShortCommit`
r   )list_keyetag)_iterr   r   r   )r   numberr7   s      r   r   Comparison.commitsr   s3     zzII  
 	
r#   )r   r   r   r   r   r   r   r   r   r   r   r   r   )N)__name__
__module____qualname____firstlineno____doc__r   r!   r0   r3   r   __static_attributes__ r#   r   r   r      s#    ;z+"?FF
r#   r   N)r@    r   r   
GitHubCorer   rB   r#   r   <module>rE      s"    1  ~
"" ~
r#   