
                         L   S r SSKJr  SSKJr  SSKJr  SSKrSSKJr  \R                  R                  \
" \R                  \   5      5         " 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g)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.
    )absolute_import)division)print_functionN)_helpersc                       \ rS rSrSrSrg)Error!   z$The base class for all flags errors. N__name__
__module____qualname____firstlineno____doc____static_attributes__r
       1platform/bq/third_party/absl/flags/_exceptions.pyr   r   !   s    ,r   r   c                       \ rS rSrSrSrg)CantOpenFlagFileError%   z\Raised when flagfile fails to open.

E.g. the file doesn't exist, or has wrong permissions.
r
   Nr   r
   r   r   r   r   %   s    r   r   c                   ,    \ rS rSrSr\SS j5       rSrg)DuplicateFlagError,   z*Raised if there is a flag naming conflict.Nc                     UR                  USS9nUc  [        R                  " 5       nOUR                  USS9nX!   R                  nSU< SU< SU< SU< 3nU " U5      $ )ad  Creates a DuplicateFlagError by providing flag name and values.

Args:
  flagname: str, the name of the flag being redefined.
  flag_values: FlagValues, the FlagValues instance containing the first
      definition of flagname.
  other_flag_values: FlagValues, 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.
z	<unknown>)defaultz
The flag 'z' is defined twice. First from z, Second from z&.  Description from first occurrence: )find_module_defining_flagr   get_calling_modulehelp)clsflagnameflag_valuesother_flag_valuesfirst_modulesecond_moduleflag_summarymsgs           r   	from_flagDuplicateFlagError.from_flag/   sy    " 88+ 9 'L 113m'AA
K B )m(--L }lDC s8Or   r
   )N)r   r   r   r   r   classmethodr'   r   r
   r   r   r   r   ,   s    2 r   r   c                       \ rS rSrSrSrg)IllegalFlagValueErrorN   z6Raised when the flag command line argument is illegal.r
   Nr   r
   r   r   r+   r+   N   s    >r   r+   c                   0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )UnrecognizedFlagErrorR   zRaised when a flag is unrecognized.

Attributes:
  flagname: str, the name of the unrecognized flag.
  flagvalue: The value of the flag, empty if the flag is not defined.
c                    > Xl         X l        U(       a  SSR                  U5      -  nOSn[        [        U ]  SU< SU< 35        g )Nz. Did you mean: %s ?z,  zUnknown command line flag '')r    	flagvaluejoinsuperr.   __init__)selfr    r3   suggestionstip	__class__s        r   r6   UnrecognizedFlagError.__init__Z   sC    MN #TYY{%;;cc	
/08#>@r   )r    r3   )r1   N)r   r   r   r   r   r6   r   __classcell__)r:   s   @r   r.   r.   R   s    
@ 
@r   r.   c                       \ rS rSrSrSrg)UnparsedFlagAccessErrorg   z>Raised when accessing the flag value from unparsed FlagValues.r
   Nr   r
   r   r   r>   r>   g   s    Fr   r>   c                       \ rS rSrSrSrg)ValidationErrork   z7Raised when flag validator constraint is not satisfied.r
   Nr   r
   r   r   rA   rA   k   s    ?r   rA   c                       \ rS rSrSrSrg) FlagNameConflictsWithMethodErroro   z:Raised when a flag name conflicts with FlagValues methods.r
   Nr   r
   r   r   rD   rD   o   s    Br   rD   )r   
__future__r   r   r   sys
absl.flagsr   disclaim_module_idsaddidmodulesr   	Exceptionr   r   r   r+   r.   r>   rA   rD   r
   r   r   <module>rN      s    '  % 
  	      CKK$9!: ;-I -E  D?E ?@E @*Ge G@e @Cu Cr   