
    1yi`                        d Z ddlmZ ddlmZ ddlmZ ddlm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 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')(z;All isort specific exception classes should be defined here    )partial)Path)Any   )profilesc                       e Zd ZdZd Zy)
ISortErrorzRBase isort exception object from which all isort sourced exceptions should inheritc                 D    t        t        |       fi | j                  dfS )N )r   type__dict__)selfs    R/var/www/html/content_weaver/venv/lib/python3.12/site-packages/isort/exceptions.py
__reduce__zISortError.__reduce__   s    T
4dmm4b99    N)__name__
__module____qualname____doc__r   r   r   r   r	   r	   
   s
    \:r   r	   c                   (     e Zd ZdZdef fdZ xZS )InvalidSettingsPathzQRaised when a settings path is provided that is neither a valid file or directorysettings_pathc                 :    t         |   d| d       || _        y )Nz)isort was told to use the settings_path: zr as the base directory or file that represents the starting point of config file discovery, but it does not exist.)super__init__r   )r   r   	__class__s     r   r   zInvalidSettingsPath.__init__   s,    7 G 	

 +r   r   r   r   r   strr   __classcell__r   s   @r   r   r      s    [+c + +r   r   c                   (     e Zd ZdZdef fdZ xZS )ExistingSyntaxErrorszURaised when isort is told to sort imports within code that has existing syntax errors	file_pathc                 :    t         |   d| d       || _        y )NzHisort was told to sort imports within code that contains syntax errors: .r   r   r#   r   r#   r   s     r   r   zExistingSyntaxErrors.__init__    s(    VW`Vaabc	
 #r   r   r    s   @r   r"   r"      s    _## # #r   r"   c                   (     e Zd ZdZdef fdZ xZS )IntroducedSyntaxErrorszQRaised when isort has introduced a syntax error in the process of sorting importsr#   c                 :    t         |   d| d       || _        y )NzTisort introduced syntax errors when attempting to sort the imports contained within r%   r&   r'   s     r   r   zIntroducedSyntaxErrors.__init__*   s(    bk	
 #r   r   r    s   @r   r)   r)   '   s    [## # #r   r)   c                   ,     e Zd ZdZdedef fdZ xZS )FileSkippedz6Should be raised when a file is skipped for any reasonmessager#   c                 @    t         |   |       || _        || _        y N)r   r   r-   r#   )r   r-   r#   r   s      r   r   zFileSkipped.__init__5   s    !"r   r   r    s   @r   r,   r,   2   s    @# # # #r   r,   c                   ,     e Zd ZdZdedef fdZ xZS )FileSkipCommentzFRaised when an entire file is skipped due to a isort skip file commentr#   kwargsc                 .    t         |   | d|       y )Nz. contains a file skip comment and was skipped.r#   r   r   r   r#   r2   r   s      r   r   zFileSkipComment.__init__>   s#    kGHT] 	 	
r   r   r    s   @r   r1   r1   ;   s    P
# 
 
 
r   r1   c                   ,     e Zd ZdZdedef fdZ xZS )FileSkipSettingzDRaised when an entire file is skipped due to provided isort settingsr#   r2   c                 .    t         |   | d|       y )NzV was skipped as it's listed in 'skip' setting or matches a glob in 'skip_glob' settingr4   r5   r6   s      r   r   zFileSkipSetting.__init__G   s'    k 8 8 	 	
r   r   r    s   @r   r8   r8   D   s    N
# 
 
 
r   r8   c                   (     e Zd ZdZdef fdZ xZS )ProfileDoesNotExistz;Raised when a profile is set by the user that doesn't existprofilec                 f    t         |   d| ddj                  t               d       || _        y )NzSpecified profile of z% does not exist. Available profiles: ,r%   )r   r   joinr   r<   )r   r<   r   s     r   r   zProfileDoesNotExist.__init__R   s;    #G9 -##&88H#5"6a9	
 r   r   r    s   @r   r;   r;   O   s    E  r   r;   c                   2     e Zd ZdZdedee   f fdZ xZS )SortingFunctionDoesNotExistz:Raised when the specified sorting function isn't available
sort_orderavailable_sort_ordersc                 l    t         |   d| ddj                  |       d       || _        || _        y )NzSpecified sort_order of z( does not exist. Available sort_orders: r>   r%   )r   r   r?   rB   rC   )r   rB   rC   r   s      r   r   z$SortingFunctionDoesNotExist.__init__]   sE    &zl 3&&)hh/D&E%FaI	
 %%:"r   )r   r   r   r   r   listr   r   r    s   @r   rA   rA   Z   s"    D;3 ;tCy ; ;r   rA   c                   (     e Zd ZdZdef fdZ xZS )FormattingPluginDoesNotExistzERaised when a formatting plugin is set by the user that doesn't exist	formatterc                 :    t         |   d| d       || _        y )NzSpecified formatting plugin of z does not exist. )r   r   rH   )r   rH   r   s     r   r   z%FormattingPluginDoesNotExist.__init__i   s"    :9+EVWX"r   r   r    s   @r   rG   rG   f   s    O## # #r   rG   c                   8     e Zd ZdZdedeee   z  f fdZ xZS )LiteralParsingFailurezwRaised when one of isorts literal sorting comments is used but isort can't parse the
    the given data structure.
    codeoriginal_errorc                 N    t         |   d| d| d       || _        || _        y )Nz(isort failed to parse the given literal z. It's important to note that isort literal sorting only supports simple literals parsable by ast.literal_eval which gave the exception of r%   )r   r   rL   rM   )r   rL   rM   r   s      r   r   zLiteralParsingFailure.__init__s   s;    6tf =<<J;K1N	

 	,r   )	r   r   r   r   r   	Exceptionr   r   r   r    s   @r   rK   rK   n   s)    -S -)d9o2M - -r   rK   c                   ,     e Zd ZdZdedef fdZ xZS )LiteralSortTypeMismatchzRaised when an isort literal sorting comment is used, with a type that doesn't match the
    supplied data structure's type.
    kindexpected_kindc                 N    t         |   d| d| d       || _        || _        y )Nz)isort was told to sort a literal of type z! but was given a literal of type r%   )r   r   rR   rS   )r   rR   rS   r   s      r   r   z LiteralSortTypeMismatch.__init__   s:    7 G!!%a)	
 	*r   )r   r   r   r   r   r   r   r    s   @r   rQ   rQ   }   s     +T +$ + +r   rQ   c                   (     e Zd ZdZdef fdZ xZS )AssignmentsFormatMismatchzRaised when isort is told to sort assignments but the format of the assignment section
    doesn't match isort's expectation.
    rL   c                 :    t         |   d| d       || _        y )NzJisort was told to sort a section of assignments, however the given code:

z

Does not match isort's strict single line formatting requirement for assignment sorting:

{variable_name} = {value}
{variable_name2} = {value2}
...

)r   r   rL   )r   rL   r   s     r   r   z"AssignmentsFormatMismatch.__init__   s+    Zf 	
 	r   r   r    s   @r   rV   rV      s    
S 
 
r   rV   c            	       ^     e Zd ZdZededededefd       Zdeeeeef   f   f fdZ	 xZ
S )	UnsupportedSettingszrRaised when settings are passed into isort (either from config, CLI, or runtime)
    that it doesn't support.
    namevaluesourcereturnc                     d|  d| d| dS )Nz	- z = z  (source: 'z')r   )rZ   r[   r\   s      r   _format_optionz"UnsupportedSettings._format_option   s    dV3ug\&<<r   unsupported_settingsc                      dj                   fd|j                         D              }t           d| d       | _        y )N
c              3   J   K   | ]  \  }} j                   |fi |  y wr/   )r_   ).0rZ   optionr   s      r   	<genexpr>z/UnsupportedSettings.__init__.<locals>.<genexpr>   s-      
4@D&D//
s    #z6isort was provided settings that it doesn't support:

z}

For a complete and up-to-date listing of supported settings see: https://pycqa.github.io/isort/docs/configuration/options.
)r?   itemsr   r   r`   )r   r`   errorsr   s   `  r   r   zUnsupportedSettings.__init__   sT     
DXD^D^D`
 
 	Fh JJ	
 %9!r   )r   r   r   r   staticmethodr   r   r_   dictr   r   r    s   @r   rY   rY      s[     =S = =c =c = =9T#tCH~2E-F 9 9r   rY   c                   .     e Zd ZdZdeez  f fdZ xZS )UnsupportedEncodingzJRaised when isort encounters an encoding error while trying to read a filefilenamec                 8    t         |   d|        || _        y )Nz#Unknown or unsupported encoding in )r   r   rm   )r   rm   r   s     r   r   zUnsupportedEncoding.__init__   s    >xjIJ r   )r   r   r   r   r   r   r   r   r    s   @r   rl   rl      s    T!t ! !r   rl   c                   ,     e Zd ZdZdedef fdZ xZS )MissingSectionzQRaised when isort encounters an import that matches a section that is not definedimport_modulesectionc                 2    t         |   d| d| d       y )NzFound z import while parsing, but z was not included in the `sections` setting of your config. Please add it before continuing
See https://pycqa.github.io/isort/#custom-sections-and-ordering for more info.r5   )r   rq   rr   r   s      r   r   zMissingSection.__init__   s)    ]O#>wi H 	
r   r   r    s   @r   rp   rp      s    [
c 
C 
 
r   rp   N)r   	functoolsr   pathlibr   typingr   r   rO   r	   r   r"   r)   r,   r1   r8   r;   rA   rG   rK   rQ   rV   rY   rl   rp   r   r   r   <module>rw      s    A    : :	+* 	+#: ##Z ##* #
k 

k 
* 	;* 	;#: #-J -+j +
 $9* 9.!* !	
Z 	
r   