bgM7dZddlmZddlZddlZddlZddlZddlmZm Z ddl m Z ddl m Z mZddlmZmZmZmZe rddlmZdd lmZdd lmZGd d ejZGd deZGddejZGddeZGddeZ GddeZ!GddeZ"GddeZ#GddeZ$GddeZ%Gdd eZ&Gd!d"eZ'Gd#d$eZ(Gd%d&eZ)Gd'd(eZ*Gd)d*eZ+Gd+d,e+Z,Gd-d.e,Z-Gd/d0e,Z.Gd1d2e+Z/Gd3d4eZ0dS)5z%Callback actions for various options.) annotationsN)CallableSequence)Path) TYPE_CHECKINGAny) exceptions extensions interfacesutils)_HelpFormatter)PyLinter)Runc8eZdZdZej ddd ZdS)_CallbackActionzCustom callback action.Nparserargparse.ArgumentParser namespaceargparse.Namespacevaluesstr | Sequence[Any] | None option_string str | NonereturnNonectNNotImplementedErrorselfrrrrs o/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/pylint/config/callback_actions.py__call__z_CallbackAction.__call__ "!r rrrrrrrrrr)__name__ __module__ __qualname____doc__abcabstractmethodr#r%r"rrsF!! %) """""""r%rceZdZdZ ddd ZdS)_DoNothingActionzAction that just passes. This action is used to allow pre-processing of certain options without erroring when they are then processed again by argparse. NrrrrrrrrrrcdSrr-r s r"r#z_DoNothingAction.__call__0s tr%rr&r'r(r)r*r#r-r%r"r/r/)s<%) r%r/ceZdZdZ ddd ZdS) _ExtendActionzAction that adds the value to a pre-existing list. It is directly copied from the stdlib implementation which is only available on 3.8+. Nrrrrrrrrrrct|ttfsJt||jg}t|tsJ||t ||j|dSr) isinstancetuplelistgetattrdestextendsetattr)r!rrrrcurrents r"r#z_ExtendAction.__call__Ass&5$-00000)TY33'4(((((v 49g.....r%rr&r1r-r%r"r3r3:s<%) / / / / / / /r%r3c\eZdZdZ d d!fd Zej d"d#dZxZS)$_AccessRunObjectActionz)Action that has access to the Run object.NFoption_strings Sequence[str]r9strnargsrconstdefaulttypechoicesrequiredboolhelpmetavarkwargsrrc v| d|_t||d|||||| | dS)Nrrrunsuper__init__ r!r@r9rCrDrErFrGrHrJrKrL __class__s r"rQz_AccessRunObjectAction.__init__RsT%=           r%rrrrrrrrctrrr s r"r#z_AccessRunObjectAction.__call__or$r%NNNNNFr?r?r@rAr9rBrCrrDrrErrFrrGrrHrIrJrBrKrBrLrrrrr& r'r(r)r*rQr+r,r# __classcell__rSs@r"r>r>Os33        :  %) """""""""r%r>cBeZdZdZ d!d"fd Z d#d$d ZxZS)%_MessageHelpActionz&Display the help message of a message.NFr?r@rAr9rBrCrrDrErFrGrHrIrJrKrLrrc v| d|_t||d|||||| | dS)Nr+rNrRs r"rQz_MessageHelpAction.__init__}sT%=            r% --help-msgrrrrrstr | Sequence[str] | Nonerrct|ttfsJg}|D]0}t|tsJ|t j|z }1|jjj |tj ddSNr) r5r7r6rBr _check_csvrOlinter msgs_store help_messagesysexit)r!rrrrvalues_to_printmsgs r"r#z_MessageHelpAction.__call__s&4-00000%' 5 5Cc3'' ' '' u/44 4OO "//@@@  r%rUrV)r^) rrrrrr_rrrr)r'r(r)r*rQr#rXrYs@r"r[r[zs00        B%1         r%r[ceZdZdZ ddd ZdS)_ListMessagesActionzDisplay all available messages.--list-enabledrrrrrrrrrrct|jjjt jddSra)rOrcrd list_messagesrfrgr s r"r#z_ListMessagesAction.__call__s. "00222  r%N)rlr&r1r-r%r"rkrks8))%5 r%rkceZdZdZ ddd ZdS)_ListMessagesEnabledActionzDisplay all enabled messages.--list-msgs-enabledrrrrrrrrrrcj|jjtjddSra)rOrclist_messages_enabledrfrgr s r"r#z#_ListMessagesEnabledAction.__call__s+ --///  r%N)rqr&r1r-r%r"rprps8''%: r%rpceZdZdZ ddd ZdS)_ListCheckGroupsActionz5Display all the check groups that pylint knows about. --list-groupsrrrrrrrrrrc|jjD]}t|t jddSra)rOrcget_checker_namesprintrfrg)r!rrrrchecks r"r#z_ListCheckGroupsAction.__call__sAX_6688  E %LLLL  r%N)rvr&r1r-r%r"rurus8??%4       r%ruceZdZdZ ddd ZdS)_ListConfidenceLevelsActionz:Display all the confidence levels that pylint knows about.--list-conf-levelsrrrrrrrrrrcptjD]}td|tjddS)Nz%-18s: r)r CONFIDENCE_LEVELSryrfrg)r!rrrrlevels r"r#z$_ListConfidenceLevelsAction.__call__sA 1 % %E #E## $ $ $ $  r%N)r}r&r1r-r%r"r|r|s8DD%9       r%r|ceZdZdZ ddd ZdS)_ListExtensionsActionz/Display all extensions under pylint.extensions.--list-extensionsrrrrrrrrrrc>ttjjD]W}|jdkrJ|jds0|jd\}}}td|Xtj ddS)Nz.py_.zpylint.extensions.r) rr __file__parentiterdirsuffixstem startswith partitionryrfrg)r!rrrrfilenameextension_namers r"r#z_ListExtensionsAction.__call__sZ0118@@BB = =H%'' 0H0H0M0M''/}'>'>s'C'C$1;>;;<<<  r%N)rr&r1r-r%r"rrs899%8       r%rceZdZdZ ddd ZdS)_FullDocumentationActionzDisplay the full documentation.--full-documentationrrrrrrrrrrcjtj|jjt jddSra)r print_full_documentationrOrcrfrgr s r"r#z!_FullDocumentationAction.__call__s* &tx777  r%N)rr&r1r-r%r"rrs8))%; r%rceZdZdZ ddd ZdS)_GenerateRCFileActionzGenerate a pylintrc file.--generate-rcfilerrrrrrrrrrctj5tjdt|jjddddn #1swxYwYtjddS)Nignore)category)Commands) skipsectionsr) warningscatch_warningsfilterwarningsDeprecationWarningrOrcgenerate_configrfrgr s r"r#z_GenerateRCFileAction.__call__s $ & & H H  #H7I J J J J HO + + + G G G H H H H H H H H H H H H H H H  s>1111,  %0 """""""r%rceZdZdZ ddd ZdS)_DisableActionz(Callback action for disabling a message.rrrrrrrrrrrcH||jj||dSr)rrcdisabler s r"r#z_DisableAction.__call__s% 4;& >>>>>r%Nrr&r1r-r%r"rrs822%0 ???????r%rceZdZdZ ddd ZdS) _EnableActionz'Callback action for enabling a message.--enablerrrrrrrrrrcH||jj||dSr)rrcenabler s r"r#z_EnableAction.__call__s% 4;%v}=====r%Nrr&r1r-r%r"rrs811%/ >>>>>>>r%rceZdZdZ ddd ZdS)_OutputFormatActionz.Callback action for setting the output format.rrrrrrrrrrrct|ttfsJt|dts Jd|j|ddS)Nrz?'output-format' should be a comma separated string of reporters)r5r6r7rBrc_load_reportersr s r"r#z_OutputFormatAction.__call__sv&5$-00000 1Is   M M L M M  ##F1I.....r%Nrr&r1r-r%r"rrs888%/ / / / / / / /r%rc\eZdZdZ dd fd Zej d!d"dZxZS)#_AccessParserActionz4Action that has access to the ArgumentParser object.NFr?r@rAr9rBrCrrDrErFrGrHrIrJrKrLrrc v| d|_t||d|||||| | dS)Nrr)rrPrQrRs r"rQz_AccessParserAction.__init__rr%rrrrrrrctrrr s r"r#z_AccessParserAction.__call__r$r%rU)r@rAr9rBrCrrDrrErrFrrGrrHrIrJrBrKrBrLrrrrr&rWrYs@r"rrs>>        :  %) """""""""r%r)1r* __future__rr+argparserfrcollections.abcrrpathlibrtypingrrpylintr r r r pylint.config.help_formatterr pylint.lintrpylint.lint.runrActionrr/ _AppendActionr3r>r[rkrprur|rrrrrrrrrrrrr-r%r"rsx,+""""""  ........%%%%%%%%<<<<<<<<<<<<$;;;;;;$$$$$$###### " " " " "ho " " ""/////H*///*("("("("("_("("("V,,,,,,,,^     0        !7        3        "8   2"     5   2$      6   +++++2+++*,&("("("("("("("("V!"!"!"!"!",!"!"!"H ? ? ? ? ?\ ? ? ? > > > > >L > > >/////3///"("("("("("/("("("("("r%