
    5iG                       S SK Jr  S SKJ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g+),    )annotations)
Collectionc                      \ rS rSrSrg)TOMLKitError    N)__name__
__module____qualname____firstlineno____static_attributes__r       2lib/python3.13/site-packages/tomlkit/exceptions.pyr   r      s    r   r   c                  T   ^  \ rS rSrSrSSU 4S jjjr\S 5       r\S 5       rSr	U =r
$ )	
ParseError
   z
This error occurs when the parser encounters a syntax error
in the TOML being parsed. The error references the line and
location within the line where the error was encountered.
c                ~   > Xl         X l        Uc  Sn[        TU ]  U SU R                    SU R                   35        g )NzTOML parse errorz	 at line z col )_line_colsuper__init__selflinecolmessage	__class__s       r   r   ParseError.__init__   s=    
	?(GG9Idjj\tyykJKr   c                    U R                   $ N)r   r   s    r   r   ParseError.line   s    zzr   c                    U R                   $ r    )r   r!   s    r   r   ParseError.col   s    yyr   )r   r   r    r   intr   r&   r   z
str | NonereturnNone)r	   r
   r   r   __doc__r   propertyr   r   r   __classcell__r   s   @r   r   r   
   s<    L L    r   r   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )MixedArrayTypesError#   z8
An array was found that had two or more element types.
c                &   > Sn[         TU ]  XUS9  g )NzMixed types found in arrayr   r   r   r   s       r   r   MixedArrayTypesError.__init__(   s    .G4r   r   r   r&   r   r&   r'   r(   r	   r
   r   r   r)   r   r   r+   r,   s   @r   r.   r.   #       5 5r   r.   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )InvalidNumberError.   z+
A numeric field was improperly specified.
c                &   > Sn[         TU ]  XUS9  g )NzInvalid numberr1   r2   r   s       r   r   InvalidNumberError.__init__3   s    "G4r   r   r4   r5   r,   s   @r   r8   r8   .   r6   r   r8   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )InvalidDateTimeError9   z,
A datetime field was improperly specified.
c                &   > Sn[         TU ]  XUS9  g )NzInvalid datetimer1   r2   r   s       r   r   InvalidDateTimeError.__init__>       $G4r   r   r4   r5   r,   s   @r   r=   r=   9   r6   r   r=   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )InvalidDateErrorD   (
A date field was improperly specified.
c                &   > Sn[         TU ]  XUS9  g )NzInvalid dater1   r2   r   s       r   r   InvalidDateError.__init__I        G4r   r   r4   r5   r,   s   @r   rC   rC   D   r6   r   rC   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )InvalidTimeErrorO   rE   c                &   > Sn[         TU ]  XUS9  g )NzInvalid timer1   r2   r   s       r   r   InvalidTimeError.__init__T   rH   r   r   r4   r5   r,   s   @r   rJ   rJ   O   r6   r   rJ   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )InvalidNumberOrDateErrorZ   z3
A numeric or date field was improperly specified.
c                &   > Sn[         TU ]  XUS9  g )NzInvalid number or date formatr1   r2   r   s       r   r   !InvalidNumberOrDateError.__init___   s    1G4r   r   r4   r5   r,   s   @r   rO   rO   Z   r6   r   rO   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )InvalidUnicodeValueErrore   z*
A unicode code was improperly specified.
c                &   > Sn[         TU ]  XUS9  g )NzInvalid unicode valuer1   r2   r   s       r   r   !InvalidUnicodeValueError.__init__j   s    )G4r   r   r4   r5   r,   s   @r   rT   rT   e   r6   r   rT   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )UnexpectedCharErrorp   z3
An unexpected character was found during parsing.
c                .   > SU< 3n[         TU ]  XUS9  g )NzUnexpected character: r1   r2   r   r   r   charr   r   s        r   r   UnexpectedCharError.__init__u   s!    *4(3G4r   r   r   r&   r   r&   r]   strr'   r(   r5   r,   s   @r   rY   rY   p   r6   r   rY   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )EmptyKeyError{   z(
An empty key was found during parsing.
c                &   > Sn[         TU ]  XUS9  g )Nz	Empty keyr1   r2   r   s       r   r   EmptyKeyError.__init__   s    G4r   r   r4   r5   r,   s   @r   rb   rb   {   r6   r   rb   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )EmptyTableNameError   z/
An empty table name was found during parsing.
c                &   > Sn[         TU ]  XUS9  g )NzEmpty table namer1   r2   r   s       r   r   EmptyTableNameError.__init__   rA   r   r   r4   r5   r,   s   @r   rg   rg      r6   r   rg   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )InvalidCharInStringError   z8
The string being parsed contains an invalid character.
c                0   > SU< S3n[         TU ]  XUS9  g )NzInvalid character z
 in stringr1   r2   r\   s        r   r   !InvalidCharInStringError.__init__   s#    &thj9G4r   r   r_   r5   r,   s   @r   rl   rl      r6   r   rl   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )UnexpectedEofError   z<
The TOML being parsed ended before the end of a statement.
c                &   > Sn[         TU ]  XUS9  g )NzUnexpected end of filer1   r2   r   s       r   r   UnexpectedEofError.__init__   s    *G4r   r   r4   r5   r,   s   @r   rq   rq      r6   r   rq   c                  4   ^  \ rS rSrSrSSU 4S jjjrSrU =r$ )InternalParserError   z.
An error that indicates a bug in the parser.
c                F   > SnU(       a	  USU S3-  n[         TU ]  XUS9  g )NzInternal parser errorz ()r1   r2   )r   r   r   r   msgr   s        r   r   InternalParserError.__init__   s/    %Ry?"CC0r   r   r    r%   r5   r,   s   @r   rv   rv      s    1 1r   rv   c                  ,   ^  \ rS rSrSrU 4S jrSrU =r$ )NonExistentKey   z
A non-existent key was used.
c                0   > SU S3n[         TU ]  U5        g )NKey "z" does not exist.r2   r   keyr   r   s      r   r   NonExistentKey.__init__   s    #/0!r   r   r5   r,   s   @r   r}   r}      s    " "r   r}   c                  ,   ^  \ rS rSrSrU 4S jrSrU =r$ )KeyAlreadyPresent   z"
An already present key was used.
c                J   > [        USU5      nSU S3n[        TU ]	  U5        g )Nr   r   z" already exists.)getattrr   r   r   s      r   r   KeyAlreadyPresent.__init__   s-    c5#&#/0!r   r   r5   r,   s   @r   r   r      s    " "r   r   c                  ,   ^  \ rS rSrSU 4S jjrSrU =r$ )InvalidControlChar   c                p   > SnUS:  a  US-  nU[        U5      SS  -  nSU SU S3n[        TU ]	  XUS9  g )	Nz\u00   0   zFControl characters (codes less than 0x1f and 0x7f) are not allowed in z, use z insteadr1   )hexr   r   )r   r   r   r]   typedisplay_coder   r   s          r   r   InvalidControlChar.__init__   sa    "9CLD	!"%##'& ).* 	 	G4r   r   )
r   r&   r   r&   r]   r&   r   r`   r'   r(   r	   r
   r   r   r   r   r+   r,   s   @r   r   r      s    5 5r   r   c                  ,   ^  \ rS rSrSU 4S jjrSrU =r$ )InvalidStringError   c           	     V   > [        U5      SS n[        TU ]	  SU U U SU S35        g )N   zInvalid string: z. The character sequences z are invalid.)reprr   r   )r   valueinvalid_sequences	delimiterrepr_r   s        r   r   InvalidStringError.__init__   sB    UAb!yk% <''8&9H	
r   r   )r   r`   r   zCollection[str]r   r`   r   r,   s   @r   r   r      s    
 
r   r   c                      \ rS rSrSrSrg)ConvertError   zRaised when item() fails to convert a value.
It should be a TypeError, but due to historical reasons
it needs to subclass ValueError as well.
r   N)r	   r
   r   r   r)   r   r   r   r   r   r      s    r   r   N)
__future__r   typingr   	Exceptionr   
ValueErrorr   r.   r8   r=   rC   rJ   rO   rT   rY   rb   rg   rl   rq   rv   KeyErrorr}   r   r   r   	TypeErrorr   r   r   r   <module>r      s   " 	9 	\ 25: 55 55: 55z 55z 55z 55z 55* 55J 55* 55z 55 5
1* 
1"X| "	" 	"5 5$
\ 
9j, r   