
    _Ogs                     J    S r SSKJr  SSKJr   " S S\R                  5      rg)z#Code search results implementation.   )models)reposc                   $    \ rS rSrSrS rS rSrg)CodeSearchResult   a  A representation of a code search result from the API.

This object has the following attributes:

.. attribute:: git_url

    The URL to retrieve the blob via Git

.. attribute:: html_url

    The URL to view the blob found in a browser.

.. attribute:: name

    The name of the file where the search result was found.

.. attribute:: path

    The path in the repository to the file containing the result.

.. attribute:: repository

    A :class:`~github3.repos.repo.ShortRepository` representing the
    repository in which the result was found.

.. attribute:: score

    The confidence score assigned to the result.

.. attribute:: sha

    The SHA1 of the blob in which the code can be found.

.. attribute:: text_matches

    A list of the text matches in the blob that generated this result.

    .. note::

        To receive these, you must pass ``text_match=True`` to
        :meth:`~github3.github.GitHub.search_code`.
c                     US   U l         US   U l        US   U l        US   U l        US   U l        [
        R                  " US   U 5      U l        US   U l        US   U l	        UR                  S	/ 5      U l        g )
Nurlgit_urlhtml_urlnamepath
repositoryscoreshatext_matches)_apir
   r   r   r   r   ShortRepositoryr   r   r   getr   )selfdatas     X/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/github3/search/code.py_update_attributes#CodeSearchResult._update_attributes2   s|    K	IZ(L	L	//\0BDI']
; HH^R8    c                 "    SU R                    S3$ )Nz<CodeSearchResult [z]>)r   )r   s    r   _reprCodeSearchResult._repr=   s    $TYYKr22r   )	r   r
   r   r   r   r   r   r   r   N)__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes__ r   r   r   r      s    )V	93r   r   N)r"    r   r   
GitHubCorer   r$   r   r   <module>r'      s     )  83v(( 83r   