
    _Og	                     `    S r SSKrSSKrSSKJr  SSKJr  S r " S S\R                  5      r	g)	z'Repository and contributor stats logic.    N   )models)usersc                     [         R                   R                  [        U S   5      5      nUR                  [        R
                  R                  5       S9U S   U S   U S   S.$ )zMap GitHub 'short' data to usable data.

.. note:: This is not meant for public consumption

:param dict week:
    The week's statistical data from GitHub
:returns:
    Huamnized week statistical data
:rtype:
    dict
w)tzinfoadc)zstart of week	additions	deletionscommits)datetimeutcfromtimestampintreplacedateutiltztzutc)weekstart_of_weeks     X/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/github3/repos/stats.pyalternate_weekr   
   s_     %%66s49~FM&..hkk6G6G6I.J#Y#Y9	     c                   $    \ rS rSrSrS rS rSrg)ContributorStats   a  Representation of a user's contributor statistics to a repository.

See also http://developer.github.com/v3/repos/statistics/

This object has the following attributes:

.. attribute:: author

    A :class:`~github3.users.ShortUser` representing the contributor
    whose stats this object represents.

.. attribute:: total

    The total number of commits authored by :attr:`author`.

.. attribute:: weeks

    A list of dictionaries containing weekly statistical data.

.. attribute:: alternate_weeks

    .. note::

        :mod:`github3` generates this data for a more humane interface
        to the data in :attr:`weeks`.

    A list of dictionaries that provide an easier to remember set of
    keys as well as a :class:`~datetime.datetime` object representing the
    start of the week. The dictionary looks vaguely like:

    .. code-block:: python

        {
            'start of week': datetime(2013, 5, 5, 5, 0, tzinfo=tzutc())
            'additions': 100,
            'deletions': 150,
            'commits': 5,
        }

c                     [         R                  " US   U 5      U l        US   U l        US   U l        U R                  nU(       a%  U R                   Vs/ s H  n[        U5      PM     nnU=U l        U l        g s  snf )Nauthortotalweeks)r   	ShortUserr   r    r!   r   alternate_weeks	alt_weeks)selfstats_objectr$   r   s       r   _update_attributes#ContributorStats._update_attributesI   so    ool8&<dC!'*
!'*
JJ	48JJ?Jq*JI?099t~ @s   A;c                 "    SU R                    S3$ )Nz<Contributor Statistics [z]>)r   )r%   s    r   _reprContributorStats._reprR   s    *4;;-r::r   )r$   r#   r   r    r!   N)__name__
__module____qualname____firstlineno____doc__r'   r*   __static_attributes__ r   r   r   r      s    'R:;r   r   )
r0   r   dateutil.tzr    r   r   r   
GitHubCorer   r2   r   r   <module>r6      s+    -    *4;v(( 4;r   