bg dZddlmZddlmZddlmZmZmZm Z m Z ddl m Z Gdde Z Gd d e ZGd d e ZGd de ZGdde ZGddeZGddeZGdde ZGdde ZGdde ZGdde ZGdde ZGdd e ZGd!d"e ZGd#d$e ZGd%d&e Zd'S)(z;All isort specific exception classes should be defined here)partial)Path)AnyDictListTypeUnion)profilesceZdZdZdZdS) ISortErrorzRBase isort exception object from which all isort sourced exceptions should inheritcDtt|fi|jdfS)N)rtype__dict__)selfs a/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/isort/exceptions.py __reduce__zISortError.__reduce__ s%T 44dm44b99N)__name__ __module__ __qualname____doc__rrrrr r s)\\:::::rr c(eZdZdZdeffd ZxZS)InvalidSettingsPathzQRaised when a settings path is provided that is neither a valid file or directory settings_pathc`td|d||_dS)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)rr __class__s rrzInvalidSettingsPath.__init__sE         +rrrrrstrr __classcell__r s@rrrsJ[[+c++++++++++rrc(eZdZdZdeffd ZxZS)ExistingSyntaxErrorszURaised when isort is told to sort imports within code that has existing syntax errors file_pathc`td|d||_dS)NzHisort was told to sort imports within code that contains syntax errors: .rrr'rr'r s rrzExistingSyntaxErrors.__init__C        #rr!r$s@rr&r&sJ__############rr&c(eZdZdZdeffd ZxZS)IntroducedSyntaxErrorszQRaised when isort has introduced a syntax error in the process of sorting importsr'c`td|d||_dS)NzTisort introduced syntax errors when attempting to sort the imports contained within r)r*r+s rrzIntroducedSyntaxErrors.__init__*r,rr!r$s@rr.r.'sJ[[############rr.c,eZdZdZdedeffd ZxZS) FileSkippedz6Should be raised when a file is skipped for any reasonmessager'cft|||_||_dSN)rrr2r')rr2r'r s rrzFileSkipped.__init__5s- !!! "rr!r$s@rr1r12sQ@@############rr1c,eZdZdZdedeffd ZxZS)FileSkipCommentzFRaised when an entire file is skipped due to a isort skip file commentr'kwargsc Tt|d|dS)Nz. contains a file skip comment and was skipped.r'rrrr'r7r s rrzFileSkipComment.__init__>s=  H H HT]      rr!r$s@rr6r6;sQPP #           rr6c,eZdZdZdedeffd ZxZS)FileSkipSettingzDRaised when an entire file is skipped due to provided isort settingsr'r7c Tt|d|dS)NzV was skipped as it's listed in 'skip' setting or matches a glob in 'skip_glob' settingr9r:r;s rrzFileSkipSetting.__init__GsC  8 8 8      rr!r$s@rr=r=DsQNN #           rr=c(eZdZdZdeffd ZxZS)ProfileDoesNotExistz;Raised when a profile is set by the user that doesn't existprofilectd|ddtd||_dS)NzSpecified profile of z% does not exist. Available profiles: ,r))rrjoinr rA)rrAr s rrzProfileDoesNotExist.__init__Rs[  9G 9 9#&88H#5#5 9 9 9    rr!r$s@rr@r@OsJEErr@c8eZdZdZdedeeffd ZxZS)SortingFunctionDoesNotExistz:Raised when the specified sorting function isn't available sort_orderavailable_sort_ordersctd|dd|d||_||_dS)NzSpecified sort_order of z( does not exist. Available sort_orders: rCr))rrrDrGrH)rrGrHr s rrz$SortingFunctionDoesNotExist.__init__]sl  Iz I I&)hh/D&E&E I I I   %%:"""r)rrrrr"rrr#r$s@rrFrFZsUDD;3;tCy;;;;;;;;;;rrFc(eZdZdZdeffd ZxZS)FormattingPluginDoesNotExistzERaised when a formatting plugin is set by the user that doesn't exist formatterc`td|d||_dS)NzSpecified formatting plugin of z does not exist. )rrrL)rrLr s rrz%FormattingPluginDoesNotExist.__init__is2 W9WWWXXX"rr!r$s@rrKrKfsJOO############rrKcHeZdZdZdedeeeefffd ZxZ S)LiteralParsingFailurezwRaised when one of isorts literal sorting comments is used but isort can't parse the the given data structure. codeoriginal_errorcttd|d|d||_||_dS)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))rrrPrQ)rrPrQr s rrzLiteralParsingFailure.__init__ss_  Nt N Nz/UnsupportedSettings.__init__..sN  4@D& D  / / / /      rz6isort 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. )rDitemsrrrd)rrderrorsr s` rrzUnsupportedSettings.__init__s    DXD^D^D`D`       J J J J   %9!!!r) rrrr staticmethodr"rrcrrr#r$s@rr]r]s=S==c=c===\= 9T#tCH~2E-F 9 9 9 9 9 9 9 9 9 9rr]c8eZdZdZdeeefffd ZxZS)UnsupportedEncodingzJRaised when isort encounters an encoding error while trying to read a filefilenamec^td|||_dS)Nz#Unknown or unsupported encoding in )rrrp)rrpr s rrzUnsupportedEncoding.__init__s/ IxIIJJJ  r) rrrrr r"rrr#r$s@rrorosSTT!sDy!1!!!!!!!!!!rroc,eZdZdZdedeffd ZxZS)MissingSectionzQRaised when isort encounters an import that matches a section that is not defined import_modulesectioncXtd|d|ddS)NzFound 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.r:)rrtrur s rrzMissingSection.__init__sK  ]  w        rr!r$s@rrsrssQ[[ c C          rrsN)r functoolsrpathlibrtypingrrrrr r rSr rr&r.r1r6r=r@rFrKrOrUrZr]rorsrrrrzsAA//////////////:::::::: + + + + +* + + +#####:########Z########*###     k        k   * ; ; ; ; ;* ; ; ;#####:### - - - - -J - - - + + + + +j + + + $99999*999.!!!!!*!!!      Z      r