§ |<ˆj>ãóì—UdZddlZddlZddlZddlZddlmZddlmZddlmZddlm Z ddlm Z ddlm Z dd lm Z dd lm Z dd lmZdd lmZdd lmZddlmZeje¦«Zejdd¦«ZeeeeeejedœZeeeeeeffed<Gd„dej ¦«Z!dddœdedede"de"deee eff d„Z#Gd„d¦«Z$Gd„d ¦«Z%dS)!z,Option handling and Option management logic.éN)ÚAny)ÚCallable)ÚDict)ÚList)ÚMapping)ÚOptional)ÚSequence)ÚTuple)ÚType)ÚUnion)Úutils)ÚPluginsÚ_ARGÚNO)ÚintÚlongÚstringÚfloatÚcomplexÚchoiceÚstrÚ_optparse_callable_mapc ó䇗eZdZdZdddœdededefdeed eee efd ed df ˆfd „Z dd e j de j deeee e fdee d df d„ZˆxZS)Ú_CallbackActionz)Shim for optparse-style callback actions.©N)Ú callback_argsÚcallback_kwargsÚargsÚcallback.rrÚkwargsÚreturncóh•—||_||_|pi|_t¦«j|i|¤ŽdS©N)Ú _callbackÚ_callback_argsÚ_callback_kwargsÚsuperÚ__init__)Úselfrrrrr Ú __class__s €úh/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/flake8/options/manager.pyr(z_CallbackAction.__init__*sCø€ð"ˆŒØ+ˆÔØ /Ð 5°2ˆÔØ�‰ŒÔ˜$Ð) &Ð)Ð)Ð)Ð)Ð)óÚparserÚ namespaceÚvaluesÚ option_stringcóº—|sd}n7t|t¦«r"t|¦«dkrt|¦«}|j||||g|j¢Ri|j¤ŽdS)Né)Ú isinstanceÚlistÚlenÚtupler$r%r&)r)r-r.r/r0s r+Ú__call__z_CallbackAction.__call__7sŽ€ðð #؈FˆFÝ ˜¥Ñ %Ô %ð #­#¨f©+¬+¸ª/¨/ݘ6‘]”]ˆF؈ŒØ Ø Ø Ø ð  ð Ô ð  ð ð ð Ô#ð  ð ð ð ð r,r#)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrr rrrr(ÚargparseÚArgumentParserÚ Namespacer r7Ú __classcell__)r*s@r+rr'sø€€€€€Ø3Ð3ð (*Ø48ð *ð *ð *àð *ð˜3 ˜8Ô$ð *ð  ”}ð *ð " $ s¨C x¤.Ô1ð *ð ð *ð ð *ð *ð *ð *ð *ð *ð$(,ð  ð àÔ'ð ðÔ%ð ð˜˜x¨œ}¨cÐ1Ô2Ô3ð  ð   ”}ð  ð ð  ð ð ð ð ð ð ð r,rF©Úcomma_separated_listÚnormalize_pathsÚvaluerrArBr!cóØ—|}|r)t|t¦«rtj|¦«}|r:t|t¦«rtj|g|¢RŽ}ntj|g|¢RŽ}|Sr#)r3rr Úparse_comma_separated_listÚnormalize_pathrB)rCrArBrÚrets r+Ú_flake8_normalizerHLsƒ€ð "'€CØð6¥ ¨3µÑ 4Ô 4ð6ÝÔ.¨uÑ5Ô5ˆàð4Ý �c�3Ñ Ô ð 4ÝÔ& sÐ2¨TÐ2Ð2Ð2ˆCˆCåÔ'¨Ð3¨dÐ3Ð3Ð3ˆCà €Jr,c'óú—eZdZdZejejejejejejejejejejejejejejejdddfdeeefdeeefdeeee j efdee efdeee de fefd eeefd ee eefd ee efd eee efd eeefdeeefdee de fefdeee efdeeee fefdeeefdedededdf&d„Zedeee ffd„¦«Zdefd„Zde dede fd„Zdeeeeee fffd„ZdS)ÚOptionz@Our wrapper around an argparse argument parsers to add features.FÚshort_option_nameÚlong_option_nameÚactionÚdefaultÚtype.ÚdestÚnargsÚconstÚchoicesÚhelpÚmetavarrrrÚrequiredÚparse_from_configrArBr!Ncó¢—|tjur1|tjur#| d¦«rtj|}}| tjur5d| vr1t d|¦«|  dd¦«} |dkr2t d|¦«t }|tjurd}t|t¦«r(t d|¦«t|}|s|rtj t||¬ ¦«}||_ ||_d „||fD¦«|_||_||_||_||_||_||_| |_| |_| |_||_| |_| |_||_|j|j|j|j|j|j|j|j|j|j|j|j|jd œ |_||_||_||_ d |_!|r@|tjurtEd ¦«‚|dd … dd¦«|_!d |_#d S)a¹ Initialize an Option instance. The following are all passed directly through to argparse. :param short_option_name: The short name of the option (e.g., ``-x``). This will be the first argument passed to ``ArgumentParser.add_argument`` :param long_option_name: The long name of the option (e.g., ``--xtra-long-option``). This will be the second argument passed to ``ArgumentParser.add_argument`` :param default: Default value of the option. :param dest: Attribute name to store parsed option value as. :param nargs: Number of arguments to parse for this option. :param const: Constant value to store on a common destination. Usually used in conjunction with ``action="store_const"``. :param choices: Possible values for the option. :param help: Help text displayed in the usage information. :param metavar: Name to use instead of the long option name for help text. :param required: Whether this option is required or not. The following options may be passed directly through to :mod:`argparse` but may need some massaging. :param type: A callable to normalize the type (as is the case in :mod:`argparse`). Deprecated: you can also pass through type strings such as ``'int'`` which are handled by :mod:`optparse`. :param action: Any action allowed by :mod:`argparse`. Deprecated: this also understands the ``action='callback'`` action from :mod:`optparse`. :param callback: Callback used if the action is ``"callback"``. Deprecated: please use ``action=`` instead. :param callback_args: Additional positional arguments to the callback callable. Deprecated: please use ``action=`` instead (probably with ``functools.partial``). :param callback_kwargs: Keyword arguments to the callback callable. Deprecated: please use ``action=`` instead (probably with ``functools.partial``). The following parameters are for Flake8's option handling alone. :param parse_from_config: Whether or not this option should be parsed out of config files. :param comma_separated_list: Whether the option is a comma separated list when parsing from a config file. :param normalize_paths: Whether the option is expecting a path or list of paths and should attempt to normalize the paths to absolute paths. z--z%defaultzuoption %s: please update `help=` text to use %%(default)s instead of %%default -- this will be an error in the futurez %(default)srz|option %s: please update from optparse `action='callback'` to argparse action classes -- this will be an error in the futurerzyoption %s: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the futurer@có.—g|]}|tju¯|‘ŒSr©rr)Ú.0Úxs r+ú z#Option.__init__..ès/€ð ð ð àØ�œÐÐð àÐÐr,) rMrNrOrPrQrRrSrrrrTrUrVNzRWhen specifying parse_from_config=True, a long_option_name must also be specified.éú-Ú_)$rrÚ startswithÚLOGÚwarningÚreplacerr3rrÚ functoolsÚpartialrHrKrLÚ option_argsrMrNrOrPrQrRrSrrrrTrUrVÚ option_kwargsrWrArBÚ config_nameÚ ValueErrorÚ_opt)r)rKrLrMrNrOrPrQrRrSrTrUrrrrVrWrArBs r+r(zOption.__init__bs¯€ðn ¥¤Ð 'Ð 'Ø!­¬Ð0Ð0Ø!×,Ò,¨TÑ2Ô2ð1õ37´'Ð;LÐ/Ð ð •t”wÐ Ð  :°Ð#5Ð#5Ý �KŠKðNà ñ ô ð ð —<’<  ¨MÑ:Ô:ˆDð �ZÒ Ð Ý �KŠKðð!ñ  ô ð õ %ˆFØ•t”wˆˆØ�õ �d�CÑ Ô ð 0Ý �KŠKðð!ñ  ô ð õ *¨$Ô/ˆDð ð  ?ð ÝÔ$Ý!Ø%9Ø /ðñôˆDð "3ˆÔØ 0ˆÔð ð à'Ð)9Ð:ð ñ ô ˆÔ𠈌 ؈Œ ؈Œ ؈Œ ؈Œ ؈Œ ؈Œ Ø ˆŒ Ø*ˆÔØ.ˆÔ؈Œ ؈Œ Ø ˆŒ à”kØ”|Ø”IØ”IØ”ZØ”ZØ”|Øœ Ø!Ô/Ø#Ô3Ø”IØ”|Øœ ð; ð; ˆÔð""3ˆÔØ$8ˆÔ!Ø.ˆÔà*.ˆÔØ ð FØ¥4¤7Ð*Ð*Ý ðAñôðð 0°°°Ô3×;Ò;¸CÀÑEÔEˆDÔ àˆŒ ˆ ˆ r,cóH—d„|j ¦«D¦«S)z(Return any actually-specified arguments.có6—i|]\}}|tju¯||“ŒSrrZ)r[ÚkÚvs r+ú z1Option.filtered_option_kwargs..s1€ð ð ð Ù�Q˜¸1ÅDÄGÐ;KÐ;KˆAˆqÐ;KÐ;KÐ;Kr,)rhÚitems©r)s r+Úfiltered_option_kwargszOption.filtered_option_kwargss2€ð ð Ø!Ô/×5Ò5Ñ7Ô7ð ñ ô ð r,cóè—g}|jD]}| |¦«Œ|j ¦«D]\}}| |›d|›�¦«Œ dd |¦«›d�S)Nú=zOption(z, ú))rgÚappendrsrqÚjoin)r)ÚpartsÚargrnros r+Ú__repr__zOption.__repr__!sŒ€ØˆØÔ#ð ð ˆCØ �LŠL˜Ñ Ô Ð Ð ØÔ/×5Ò5Ñ7Ô7ð 'ð '‰DˆAˆqØ �LŠL˜A˜˜ ˜˜Ñ &Ô &Ð &Ð &Ø,˜Ÿš 5Ñ)Ô)Ð,Ð,Ð,Ð,r,rCÚnormalize_argscóè—|jr)t|t¦«rtj|¦«}|jr:t|t ¦«rtj|g|¢RŽ}ntj|g|¢RŽ}|S)z6Normalize the value based on the option configuration.)rAr3rr rErBr4rF)r)rCr|s r+Ú normalizezOption.normalize)s„€à Ô $ð <­°E½3Ñ)?Ô)?ð <ÝÔ4°UÑ;Ô;ˆEà Ô ð Eݘ%¥Ñ&Ô&ð EÝÔ-¨eÐE°nÐEÐEÐE��åÔ,¨UÐD°^ÐDÐDÐD�àˆ r,có—|j|jfS)z?Convert a Flake8 Option to argparse ``add_argument`` arguments.)rgrsrrs r+Ú to_argparsezOption.to_argparse6s€àÔ Ô!<Ð<м'Ø$(¤GØ59´WØ!%¤Ø'+¤wØ"&¤'Ø.2¬gØ!%¤Ø$(¤Gà48´GØ48´GØ:>¼'à&*¤gà"'Ø%*Ø %ð/vðvà   d Ô+ðvð   T  Ô*ðvð �c˜4 ¤Ô0°$Ð6Ô7ð vð �s˜D�yÔ!ð vð�C˜ # s (Ô+¨TÐ1Ô2ðvð�C˜�IÔðvð�S˜#˜t�^Ô$ðvð�S˜$�YÔðvð�x ”} dÐ*Ô+ðvð�C˜�IÔðvð�s˜D�yÔ!ðv𘠠c Ô*¨DÐ0Ô1ðvð ˜X cœ]¨DÐ0Ô1ð!vð"˜w s¨C xÔ0°$Ð6Ô7ð#vð&˜˜d˜ Ô#ð'vð* ð+vð,#ð-vð.ð/vð0 ð1vðvðvðvðp𠨨S°#¨X¬ð ð ð ñ„Xð ð -˜#ð-ð-ð-ð-ð ˜sð °Sð ¸Sð ð ð ð ð=˜U 4¨¤9¨d°3¸°8¬nÐ#<Ô=ð=ð=ð=ð=ð=ð=r,rJcóî—eZdZdZdededeejddfd„Zde ddfd „Z d e d e ddfd „Z d e eddfd„Zd e eddfd„Z dd ee edeejdejfd„ZdS)Ú OptionManagerz=Manage Options and OptionParser while adding post-processing.ÚversionÚplugin_versionsÚparentsr!Nc ó2—tjdd|d|›�¬¦«|_|j dd|›d|›dt j¦«›�¬ ¦«|j d d d ¬ ¦«i|_g|_g|_g|_ d|_ dS)aŽInitialize an instance of an OptionManager. :param prog: Name of the actual program (e.g., flake8). :param version: Version string for the program. :param usage: Basic usage string used by the OptionParser. :param parents: A list of ArgumentParser objects whose arguments should also be included. Úflake8z %(prog)s [options] file file ...zInstalled plugins: )ÚprogÚusagerˆÚepilogz --versionr†z (z) )rMr†Ú filenamesÚ*Úfilename)rQrUN) r<r=r-Ú add_argumentr Úget_python_versionÚconfig_options_dictÚoptionsÚextended_default_ignoreÚextended_default_selectÚ_current_group)r)r†r‡rˆs r+r(zOptionManager.__init__>sÓ€õ&Ô-ØØ4ØØ:¨Ð:Ð:ð  ñ ô ˆŒ ð Œ × Ò Ø Øàð0ð0˜oð0ð0ÝÔ+Ñ-Ô-ð0ð0ð !ñ ô ð ð Œ × Ò  °CÀÐ ÑLÔLÐLà68ˆÔ Ø%'ˆŒ Ø24ˆÔ$Ø24ˆÔ$àAEˆÔÐÐr,Úpluginscó:‡‡—iŠdtddfˆˆfd„ }| ¦«D]j}t|jdd¦«}|r ||jj¦«|‰¦«|jjjdkr‰ |j g¦«Œkd‰_ dS)z(Register the plugin options (if needed).Únamer!Ncó’•— ‰|‰_dS#t$r*‰j |¦«}|x‰_‰|<YdSwxYwr#)r—ÚKeyErrorr-Úadd_argument_group)ršÚgroupÚgroupsr)s €€r+Ú _set_groupz2OptionManager.register_plugins.._set_groupmsaø€ð ;Ø&,¨T¤l�Ô#Ð#Ð#øÝð ;ð ;ð ;Øœ ×6Ò6°tÑ<Ô<�Ø5:Ð:�Ô# f¨T¡l l l lð ;øøøsƒ ’0AÁAÚ add_optionszflake8.extension) rÚ all_pluginsÚgetattrÚobjÚpluginÚpackageÚ entry_pointržÚextend_default_selectÚ entry_namer—)r)r˜r Úloadedr¡rŸs` @r+Úregister_pluginszOptionManager.register_pluginsisØøø€à57ˆð ;�Sð ; Tð ;ð ;ð ;ð ;ð ;ð ;ð ;ð×)Ò)Ñ+Ô+ð @ð @ˆFÝ! &¤*¨m¸TÑBÔBˆKØð "Ø� ˜6œ=Ô0Ñ1Ô1Ð1Ø� ˜DÑ!Ô!Ð!àŒ}Ô(Ô.Ð2DÒDÐDØ×*Ò*¨FÔ,=Ð+>Ñ?Ô?Ð?øð#ˆÔÐÐr,rr có‚—t|i|¤Ž}| ¦«\}}|j�|jj|i|¤Žn|jj|i|¤Ž|j |¦«|jr3|j}|€J‚||j |<||j |  dd¦«<t  d|¦«dS)a<Create and register a new option. See parameters for :class:`~flake8.options.manager.Option` for acceptable arguments to this method. .. note:: ``short_option_name`` and ``long_option_name`` may be specified positionally as they are with argparse normally. Nr`r_zRegistered option "%s".) rJr€r—r‘r-r”rwrWrir“rdrbÚdebug)r)rr Úoptionrgrhršs r+Ú add_optionzOptionManager.add_option€sæ€õ˜Ð( Ð(Ð(ˆØ%+×%7Ò%7Ñ%9Ô%9Ñ"ˆ �]Ø Ô Ð *Ø ,ˆDÔ Ô ,¨kÐ K¸]Ð KÐ KÐ KÐ Kà $ˆDŒKÔ $ kÐ C°]Ð CÐ CÐ CØ Œ ×Ò˜FÑ#Ô#Ð#Ø Ô #ð FØÔ%ˆDØÐ#Ð#Ð#Ø-3ˆDÔ $ TÑ *Ø?EˆDÔ $ T§\¢\°#°sÑ%;Ô%;Ñ <Ý � Š Ð+¨VÑ4Ô4Ð4Ð4Ð4r,Ú error_codescóp—t d|¦«|j |¦«dS)zÚExtend the default ignore list with the error codes provided. :param error_codes: List of strings that are the error/warning codes with which to extend the default ignore list. z%Extending default ignore list with %rN)rbr­r•Úextend©r)r°s r+Úextend_default_ignorez#OptionManager.extend_default_ignore™ó6€õ � Š Ð9¸;ÑGÔGÐGØ Ô$×+Ò+¨KÑ8Ô8Ð8Ð8Ð8r,cóp—t d|¦«|j |¦«dS)zÚExtend the default select list with the error codes provided. :param error_codes: List of strings that are the error/warning codes with which to extend the default select list. z%Extending default select list with %rN)rbr­r–r²r³s r+r¨z#OptionManager.extend_default_select£rµr,r/cóx—|r|jjdit|¦«¤Ž|j |¦«S)z6Proxy to calling the OptionParser's parse_args method.r)r-Ú set_defaultsÚvarsÚ parse_args)r)rr/s r+rºzOptionManager.parse_args­sC€ð ð 5Ø $ˆDŒKÔ $Ð 4Ð 4¥t¨F¡|¤|Ð 4Ð 4Ð 4ØŒ{×%Ò% dÑ+Ô+Ð+r,)NN)r8r9r:r;rrr<r=r(rr«rr¯r r´r¨rr>rºrr,r+r…r…;sO€€€€€ØGÐGð(Fðð(Fðð (Fð �hÔ-Ô.ð (Fð ð (Fð(Fð(Fð(FðV#¨ð#°Dð#ð#ð#ð#ð.5 ð5¨sð5°tð5ð5ð5ð5ð29°¸#´ð9À4ð9ð9ð9ð9ð9°¸#´ð9À4ð9ð9ð9ð9ð)-Ø/3ð,ð,à�x ”}Ô%ð,ð˜Ô+Ô,ð,ð Ô ð ,ð,ð,ð,ð,ð,r,r…)&r;r<ÚenumreÚloggingÚtypingrrrrrrr r r r rŠr Úflake8.plugins.finderrÚ getLoggerr8rbÚEnumrrrrrrrÚ__annotations__r�rr‚rHrJr…rr,r+úrÂs}ðØ2Ð2Ð2Ø€€€Ø € € € ØÐÐÐØ€€€ØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐàÐÐÐÐÐØ)Ð)Ð)Ð)Ð)Ð)à€gÔ˜Ñ!Ô!€ð€t„y�˜ÑÔ€ð Ø ØØ ØØŒgà ð =ð =И˜S %¨¨S¬ °4¨Ô"8Ð8Ô9ð ð ñ ð" ð" ð" ð" ð" �h”oñ" ô" ð" ðP"'Ø!ð ððØ ðà ððððð ð  ˆ3��S” ˆ>Ôð ðððð&Y=ðY=ðY=ðY=ðY=ñY=ôY=ðY=ðxz,ðz,ðz,ðz,ðz,ñz,ôz,ðz,ðz,ðz,r,