
    _Og$	                     j    S r SSKJr   " S S\R                  5      r " S S\5      r " S S\5      rg	)
z&Module containing the GistFile object.   )modelsc                   *    \ rS rSrSrS rS rS rSrg)	_GistFile   zBase for GistFile classes.c                 h    US   U l         US   U l        US   U l        US   U l        US   U l        g )Nraw_urlfilenamelanguagesizetype)r   r	   r
   r   r   )selfgistfiles     W/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/github3/gists/file.py_update_attributes_GistFile._update_attributes   s>    	* , ,V$	V$	    c                      SR                  U S9$ )Nz<{s.class_name} [{s.filename}]>)s)format)r   s    r   _repr_GistFile._repr   s    077$7??r   c                     U R                  U R                  5      nU R                  USS5      (       a  UR                  $ g)zxRetrieve contents of file from key 'raw_url'.

:returns:
    unaltered, untruncated contents of file.
:rtype:
    bytes
   i  N)_getr   _booleancontent)r   resps     r   r   _GistFile.content   s6     yy&==sC((<<r   )r	   r
   r   r   r   N)	__name__
__module____qualname____firstlineno____doc__r   r   r   __static_attributes__ r   r   r   r      s    $%@r   r   c                   0   ^  \ rS rSrSrS rU 4S jrSrU =r$ )GistFile    a  This represents the full file object returned by interacting with gists.

The object has all of the attributes as returned by the API for a
ShortGistFile as well as:

.. attribute:: truncated

    A boolean attribute that indicates whether :attr:`original_content`
    contains all of the file's contents.

.. attribute:: original_content

    The contents of the file (potentially truncated) returned by the API.
    If the file was truncated use :meth:`content` to retrieve it in its
    entirety.

c                 L   > [         TU ]  U5        US   U l        US   U l        g )Nr   	truncated)superr   original_contentr*   )r   r   	__class__s     r   r   GistFile._update_attributes5   s)    "8, ( 3!+.r   )r,   r*   )	r   r    r!   r"   r#   
class_namer   r$   __classcell__)r-   s   @r   r'   r'       s    $ J/ /r   r'   c                        \ rS rSrSrS r\rSrg)ShortGistFile;   a;  This represents the file object returned by interacting with gists.

The object has the following attributes as returned by the API for a Gist:

.. attribute:: raw_url

    This URL provides access to the complete, untruncated content of the
    file represented by this object.

.. attribute:: filename

    The string for the filename.

.. attribute:: language

    The GitHub detected language for the file, e.g., Erlang, Python, text.

.. attribute:: type

    The mime-type of the file. Related to :attr:`language`.

.. attribute:: size

    The file size in bytes.
r%   N)	r   r    r!   r"   r#   r/   r'   _refresh_tor$   r%   r   r   r2   r2   ;   s    4 !JKr   r2   N)r#    r   
GitHubCorer   r'   r2   r%   r   r   <module>r7      s5    , !! 6/y /6I r   