o
    h	                     @  s   d dl mZ d dlmZ erd dlmZ G dd deZG dd deZG dd	 d	eZ	G d
d deZ
G dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZdS )    )annotations)TYPE_CHECKING)Aliasc                   @     e Zd ZdZdS )GriffeError)The base exception for all Griffe errors.N__name__
__module____qualname____doc__ r   r   \/var/www/html/openai_agents/venv/lib/python3.10/site-packages/griffe/_internal/exceptions.pyr          r   c                   @  r   )LoadingErrorr   Nr   r   r   r   r   r      r   r   c                   @  r   )NameResolutionErrorz>Exception for names that cannot be resolved in a object scope.Nr   r   r   r   r   r      r   r   c                   @  r   )UnhandledEditableModuleErrorzBException for unhandled editables modules, when searching modules.Nr   r   r   r   r   r      r   r   c                   @  r   )UnimportableModuleErrorz.Exception for modules that cannot be imported.Nr   r   r   r   r   r      r   r   c                      "   e Zd ZdZd fddZ  ZS )	AliasResolutionErrorz,Exception for alias that cannot be resolved.aliasr   returnNonec                   sd   || _ 	 d|j d|j }z|jj}W n	 ty   Y nw |d| d|j d7 }t | dS )zpInitialize the exception.

        Parameters:
            alias: The alias that could not be resolved.
        zCould not resolve alias z pointing at z (in :)N)	r   pathtarget_pathparentrelative_filepathBuiltinModuleErroralias_linenosuper__init__)selfr   messagefilepath	__class__r   r   r"   "   s   zAliasResolutionError.__init__)r   r   r   r   r	   r
   r   r   r"   __classcell__r   r   r&   r   r          r   c                      r   )	CyclicAliasErrorz5Exception raised when a cycle is detected in aliases.chain	list[str]r   r   c                   s$   || _ 	 t dd| j   dS )z{Initialize the exception.

        Parameters:
            chain: The cyclic chain of items (such as target path).
        zCyclic aliases detected:
  z
  N)r,   r!   r"   join)r#   r,   r&   r   r   r"   8   s   zCyclicAliasError.__init__)r,   r-   r   r   r(   r   r   r&   r   r+   5   r*   r+   c                   @  r   )LastNodeErrorz?Exception raised when trying to access a next or previous node.Nr   r   r   r   r   r/   D   r   r/   c                   @  r   )RootNodeErrorzGException raised when trying to use siblings properties on a root node.Nr   r   r   r   r   r0   H   r   r0   c                   @  r   )r   zHException raised when trying to access the filepath of a builtin module.Nr   r   r   r   r   r   L   r   r   c                   @  r   )ExtensionErrorz+Base class for errors raised by extensions.Nr   r   r   r   r   r1   P   r   r1   c                   @  r   )ExtensionNotLoadedErrorz7Exception raised when an extension could not be loaded.Nr   r   r   r   r   r2   T   r   r2   c                   @  r   )GitErrorz+Exception raised for errors related to Git.Nr   r   r   r   r   r3   X   r   r3   N)
__future__r   typingr   griffe._internal.modelsr   	Exceptionr   r   r   r   r   r   r+   r/   r0   r   r1   r2   r3   r   r   r   r   <module>   s"   