
    _Og              
       x   S r  " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S	 S
\5      r " S S\5      r " S S\5      r " S S\5      r	 " S S\5      r
 " S S\
5      r " S S\5      r " S S\
5      r " S S\5      r " S S\5      r " S S\5      r " S S \5      r " S! S"\5      r " S# S$\5      r " S% S&\5      r " S' S(\5      r " S) S*\5      r " S+ S,\5      r " S- S.\5      r " S/ S0\5      r " S1 S2\5      r " S3 S4\5      r " S5 S6\5      r\\\\\\\\\S7.	rS8 rg9):z'All exceptions for the github3 library.c                       \ rS rSrSrSrg)GitHubException   zeThe base exception class.

.. versionadded:: 1.0.0

    Necessary to handle pre-response exceptions

 N__name__
__module____qualname____firstlineno____doc____static_attributes__r       W/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/github3/exceptions.pyr   r           	r   r   c                       \ rS rSrSrSrg)GeneratedTokenExpired   ]This exception is used to prevent an expired token from being used.

.. versionadded:: 1.2.0
r   Nr   r   r   r   r   r          
 	r   r   c                       \ rS rSrSrSrg)AppInstallationTokenExpired   r   r   Nr   r   r   r   r   r      r   r   r   c                       \ rS rSrSrSrg)AppTokenExpired"   r   r   Nr   r   r   r   r   r   "   r   r   r   c                       \ rS rSrSrSrg)MissingAppAuthentication+   YRaised when user tries to call a method that requires app auth.

.. versionadded:: 1.2.0
r   Nr   r   r   r   r   r   +   r   r   r   c                       \ rS rSrSrSrg)MissingAppBearerAuthentication4   r   r   Nr   r   r   r   r    r    4   r   r   r    c                       \ rS rSrSrSrg)$MissingAppInstallationAuthentication=   zaRaised when user tries to call a method that requires app installation.

.. versionadded:: 1.2.0
r   Nr   r   r   r   r#   r#   =   r   r   r#   c                       \ rS rSrSrSrg)CardHasNoContentUrlF   zRaised when attempting a card has no ``content_url``.

We use this in methods to retrieve the underlying issue or pull request
based on the ``content_url``.

.. versionadded:: 1.3.0
r   Nr   r   r   r   r&   r&   F   r   r   r&   c                   H   ^  \ rS rSrSrU 4S jrS rS r\S 5       r	Sr
U =r$ )GitHubErrorR   a{  The base exception class for all response-related exceptions.

.. versionchanged:: 1.0.0

    This now inherits from :class:`~github3.exceptions.GitHubException`

.. attribute:: response

    The response object that triggered the exception

.. attribute:: code

    The response's status code

.. attribute:: errors

    The list of errors (if present) returned by GitHub's API
c                 \  > [         TU ]  U5        Xl        UR                  U l        / U l         UR                  5       nUR                  S5      U l        UR                  S5      (       a  UR                  S5      U l        gg! [         a    UR                  =(       d    SU l         gf = f)zInitialize our exception class.messageerrorsz[No message]N)super__init__responsestatus_codecoder-   jsongetmsg	Exceptioncontent)selfresperror	__class__s      r   r/   GitHubError.__init__f   s    $$		6IIKEyy+DHyy""#ii1 # 	6||5~DH	6s   AB $B+*B+c                     SR                  U R                  R                  U R                  =(       d    U R                  5      $ )N	<{} [{}]>)formatr;   r   r5   r2   r8   s    r   __repr__GitHubError.__repr__w   s1    !!NN##TXX%:
 	
r   c                 8    U R                    SU R                   3$ )N )r2   r5   r@   s    r   __str__GitHubError.__str__|   s    ))AdhhZ((r   c                     U R                   $ )z'The actual message returned by the API.)r5   r@   s    r   r,   GitHubError.message   s     xxr   )r2   r-   r5   r0   )r   r   r	   r
   r   r/   rA   rE   propertyr,   r   __classcell__r;   s   @r   r)   r)   R   s+    &6"

)  r   r)   c                       \ rS rSrSrS rSrg)IncompleteResponse   zException for a response that doesn't have everything it should.

This has the same attributes as :class:`~github3.exceptions.GitHubError`
as well as

.. attribute:: exception

    The original exception causing the IncompleteResponse exception
c                 ^    SU l         SU l        Xl        / U l        X l        SU< S3U l        g)z"Initialize our IncompleteResponse.Nz5The library was expecting more data in the response (zp). Either GitHub modified it's response body, or your token is not properly scoped to retrieve this information.)r0   r2   r3   r-   	exceptionr5   )r8   r3   rP   s      r   r/   IncompleteResponse.__init__   s/    		"
 	r   )r2   r-   rP   r3   r5   r0   N)r   r   r	   r
   r   r/   r   r   r   r   rM   rM      s    r   rM   c                   0   ^  \ rS rSrSrSrU 4S jrSrU =r$ )NotRefreshable   z8Exception to indicate that an object is not refreshable.zd"{}" is not refreshable because the GitHub API does not provide a URL to retrieve its contents from.c                 V   > [         TU ]  U R                  R                  U5      5        g)z(Initialize our NotRefreshable exception.N)r.   r/   message_formatr?   )r8   object_namer;   s     r   r/   NotRefreshable.__init__   s!    ,,33K@Ar   r   )	r   r   r	   r
   r   rV   r/   r   rJ   rK   s   @r   rS   rS      s    B	; 
B Br   rS   c                       \ rS rSrSrSrg)ResponseError   z=The base exception for errors stemming from GitHub responses.r   Nr   r   r   r   rZ   rZ      s    Gr   rZ   c                   6   ^  \ rS rSrSrSrU 4S jrS rSrU =r	$ )TransportError   zCatch-all exception for errors coming from Requests.

.. versionchanged:: 1.0.0

    Now inherits from :class:`~github3.exceptions.GitHubException`.
z7An error occurred while making a request to GitHub: {0}c                    > U R                   R                  [        U5      5      U l        [        TU ]  X R                  U5        Xl        g)z$Initialize TransportError exception.N)
msg_formatr?   strr5   r.   r/   rP   )r8   rP   r;   s     r   r/   TransportError.__init__   s5    ??))#i.9xx3"r   c                 J    [        U R                  5       SU R                   3$ )Nz: )typerP   r5   r@   s    r   rE   TransportError.__str__   s!    t~~&'r$((44r   )rP   r5   )
r   r   r	   r
   r   r`   r/   rE   r   rJ   rK   s   @r   r]   r]      s     KJ#5 5r   r]   c                       \ rS rSrSrSrSrg)ConnectionError   zBException for errors in connecting to or reading data from GitHub.z*A connection-level exception occurred: {0}r   N)r   r   r	   r
   r   r`   r   r   r   r   rg   rg      s
    L=Jr   rg   c                       \ rS rSrSrSrg)UnexpectedResponse   z3Exception class for responses that were unexpected.r   Nr   r   r   r   rj   rj      s    =r   rj   c                   *    \ rS rSrSrS rS rS rSrg)UnprocessableResponseBody   z<Exception class for response objects that cannot be handled.c                 F    [         R                  X5        X l        Xl        g)z%Initialize UnprocessableResponseBody.N)r6   r/   bodyr5   )r8   r,   rp   s      r   r/   "UnprocessableResponseBody.__init__   s    4)	r   c                 :    SR                  SU R                  5      $ )Nr>   rm   )r?   rp   r@   s    r   rA   "UnprocessableResponseBody.__repr__   s    !!"=tyyIIr   c                     U R                   $ )N)r,   r@   s    r   rE   !UnprocessableResponseBody.__str__   s    ||r   )rp   r5   N)	r   r   r	   r
   r   r/   rA   rE   r   r   r   r   rm   rm      s    FJr   rm   c                       \ rS rSrSrSrg)
BadRequest   z"Exception class for 400 responses.r   Nr   r   r   r   rw   rw          ,r   rw   c                       \ rS rSrSrSrg)AuthenticationFailed   zException class for 401 responses.

Possible reasons:

- Need one time password (for two-factor authentication)
- You are not authorized to access the resource
r   Nr   r   r   r   r{   r{      r   r   r{   c                       \ rS rSrSrSrg)ForbiddenError   zException class for 403 responses.

Possible reasons:

- Too many requests (you've exceeded the ratelimit)
- Too many login failures
r   Nr   r   r   r   r~   r~      r   r   r~   c                       \ rS rSrSrSrg)NotFoundError   z"Exception class for 404 responses.r   Nr   r   r   r   r   r      ry   r   r   c                       \ rS rSrSrSrg)MethodNotAllowedi  z"Exception class for 405 responses.r   Nr   r   r   r   r   r     ry   r   r   c                       \ rS rSrSrSrg)NotAcceptablei  z"Exception class for 406 responses.r   Nr   r   r   r   r   r     ry   r   r   c                       \ rS rSrSrSrg)Conflicti  zjException class for 409 responses.

Possible reasons:

- Head branch was modified (SHA sums do not match)
r   Nr   r   r   r   r   r     s     	r   r   c                       \ rS rSrSrSrg)UnprocessableEntityi  z"Exception class for 422 responses.r   Nr   r   r   r   r   r     ry   r   r   c                       \ rS rSrSrSrg)ClientErrori"  z8Catch-all for 400 responses that aren't specific errors.r   Nr   r   r   r   r   r   "  s    Br   r   c                       \ rS rSrSrSrg)ServerErrori(  z"Exception class for 5xx responses.r   Nr   r   r   r   r   r   (  ry   r   r   c                       \ rS rSrSrSrg)UnavailableForLegalReasonsi.  z"Exception class for 451 responses.r   Nr   r   r   r   r   r   .  ry   r   r   )	  i  i  i  i  i  i  i  i  c                     [         R                  U R                  5      nUc@  SU R                  s=::  a  S:  a	  O  O[        nSU R                  s=::  a  S:  a	  O  O[        nU" U 5      $ )zBReturn the appropriate initialized exception class for a response.r   i  iX  )error_classesr4   r1   r   r   )r0   klasss     r   	error_forr   A  sW    h223E}(&&,,E(&&,,E?r   N)r   r6   r   r   r   r   r   r    r#   r&   r)   rM   rS   rZ   r]   rg   rj   rm   rw   r{   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   <module>r      s|   -		i 			O 		"7 		+ 		 		%= 		+C 			/ 		0/ 0f 2
B_ 
B	K 	5_ 5(>n >	 	  	 			= 				] 			M 		} 		M 		} 		- 		- 		- 		 	 
								#
r   