
    ij                     D   d Z ddlmZ ddlZddlmZ ddlmZ ej                  j                   e
ej                  e                dZ G d de      Z G d	 d
e      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Zy)zException classes in ABSL flags library.

Do NOT import this module directly. Import the flags package and use the
aliases defined at the package level instead.
    )SequenceN)Any)_helpersz	<unknown>c                       e Zd ZdZy)Errorz$The base class for all flags errors.N__name__
__module____qualname____doc__     k/var/www/html/emotional.easysim.app/public_html/venv/lib/python3.12/site-packages/absl/flags/_exceptions.pyr   r   !   s    ,r   r   c                       e Zd ZdZy)CantOpenFlagFileErrorz`Raised when flagfile fails to open.

  E.g. the file doesn't exist, or has wrong permissions.
  Nr   r   r   r   r   r   %   s    r   r   c                   2    e Zd ZdZe	 ddededefd       Zy)DuplicateFlagErrorz*Raised if there is a flag naming conflict.Nflagnameflag_valuesother_flag_valuesc                     |j                  |t              }|t        j                         }n|j                  |t              }||   j                  }d| d| d| d| } | |      S )am  Creates a DuplicateFlagError by providing flag name and values.

    Args:
      flagname: The name of the flag being redefined.
      flag_values: The FlagValues instance containing the first definition of
        flagname.
      other_flag_values: If it is not None, it should be the FlagValues object
        where the second definition of flagname occurs. If it is None, we assume
        that we're being called when attempting to create the flag a second
        time, and we use the module calling this one as the source of the second
        definition.

    Returns:
      An instance of DuplicateFlagError.
    )defaultz
The flag 'z' is defined twice. First from z, second from z%. Description from first occurrence: )find_module_defining_flag_UNKNOWN_MODULEr   get_calling_modulehelp)clsr   r   r   first_modulesecond_moduleflag_summarymsgs           r   	from_flagzDuplicateFlagError.from_flag/   s    & 88/ 9 L  113m'AA
O B m x(--L
XJ=l^ L% '>	 
 s8Or   )N)r	   r
   r   r   classmethodstrr   r"   r   r   r   r   r   ,   s2    2EI!!'*!?B! !r   r   c                       e Zd ZdZy)IllegalFlagValueErrorz6Raised when the flag command line argument is illegal.Nr   r   r   r   r&   r&   T   s    >r   r&   c                   <     e Zd ZdZ	 	 ddededee   f fdZ xZS )UnrecognizedFlagErrorzRaised when a flag is unrecognized.

  Attributes:
    flagname: The name of the unrecognized flag.
    flagvalue: The value of the flag, empty if the flag is not defined.
    suggestions: Optional suggestions about the correct flag name.
  r   	flagvaluesuggestionsc                     || _         || _        |rddj                  |       d}nd}t        |   d| d|        y )Nz. Did you mean: z, z ? zUnknown command line flag '')r   r)   joinsuper__init__)selfr   r)   r*   tip	__class__s        r   r0   zUnrecognizedFlagError.__init__a   sP     DMDN tyy56b9cc	G28*AcUCDr   )r,   r   )	r	   r
   r   r   r$   r   r   r0   __classcell__)r3   s   @r   r(   r(   X   s?     #%	EE E C=	E Er   r(   c                       e Zd ZdZy)UnparsedFlagAccessErrorzGRaised when accessing the flag value from unparsed :class:`FlagValues`.Nr   r   r   r   r6   r6   r   s    Or   r6   c                       e Zd ZdZy)ValidationErrorz7Raised when flag validator constraint is not satisfied.Nr   r   r   r   r8   r8   v   s    ?r   r8   c                       e Zd ZdZy) FlagNameConflictsWithMethodErrorzCRaised when a flag name conflicts with :class:`FlagValues` methods.Nr   r   r   r   r:   r:   z   s    Kr   r:   )r   collections.abcr   systypingr   
absl.flagsr   disclaim_module_idsaddidmodulesr	   r   	Exceptionr   r   r   r&   r(   r6   r8   r:   r   r   r   <module>rD      s    % 
   	      CKK$9!: ;-I -E % %P?E ?EE E4Pe P@e @Lu Lr   