dvkMddlmZddlZddlZddlZddlmZddlmZddl m Z m Z ddl m Z ddlmZddlmZmZdd lmZdd lmZdd lmZdd lmZdd lmZddlmZmZddl m!Z! ddl"Z"ddl"m#Z#n #e$$rdZ"YnwxYw ddl%m&Z&n #e$$rdZ&YnwxYwddZ'ddZ(e)Z*GddZ+Gdde+Z,dS)) annotationsN)Sequence)Path)AnyClassVar)config)clear_lru_caches)_handle_pylint_config_commands!_register_generate_config_options)_config_initialization)ArgumentPreprocessingError)_preprocess_options) full_version)_make_run_options)MANAGERPyLinter) BaseReporter) synchronize)ProcessPoolExecutorreturn int | Nonechd\}}tdr\tdd5}t|}dddn #1swxYwY|r|dkrtdrotdd5}t|}dddn #1swxYwYt||z }ntdrntdd5}t|}dddn #1swxYwYt|d z }|d krd }|S) zTry to determine number of CPUs allotted in a docker container. This is based on discussion and copied from suggestions in https://bugs.python.org/issue36054. )NNz#/sys/fs/cgroup/cpu/cpu.cfs_quota_usutf-8encodingNz$/sys/fs/cgroup/cpu/cpu.cfs_period_usz/sys/fs/cgroup/cpu/cpu.sharesir)ris_fileopenintreadrstrip) cpu_quota avail_cpufile cpu_period cpu_sharess /srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pylint/lint/run.py _query_cpur)(sO &Iy 122::<<2 7' J J J 2dDIIKK..0011I 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 + OO 7 8 8 @ @ B B 87 K K K 3tTYY[[//1122J 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 J.// - . . 6 6 8 8+ 1G D D D 3TYY[[//1122J 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 T)** A~~ s54A88A<?A<=4C==DD 4F  FFr c&t}d}ttdd}|rt|d}ntrt j}nd}t jdkrt|d}|t||S|S)zWUse sched_affinity if available for virtualized or containerized environments. Nsched_getaffinityrrwin328) r)getattroslenmultiprocessing cpu_countsysplatformmin) cpu_sharer2r+s r( _cpu_countr7Ns II$7>>))!,,-- #-//   |w 2&& 9i((( c<eZdZUdZeZdZdZded< dde fddZ dS)RunzAHelper class to use as main for pylint with 'run(*sys.argv[1:])'.))CommandszROptions which are actually commands. Options in this group are mutually exclusive.FClassVar[bool]_is_pylint_configNTargs Sequence[str]reporterBaseReporter | Noneexitbooldo_exitrrNonec d|vr(tttjdd|_d|_g|_d|_ t||}nF#t$r9}t|tj tjdYd}~nd}~wwxYw|j7ttj d}|rt||_|t!||j|jx|_}|||j|d|d|jrt1|jt5||||j|j }|jrAt7jd t:t=|}|rtj|dS|s5t|tjd|j j dkr=td |j j d tj tjd|j j d ks|j j dkratB2tdtj |"dd n(|j j dkrtG|j _ |jr tI|jdd5} | |j%_&|'||(} dddn #1swxYwYno#tR$r9}t|tj tjdYd}~n1d}~wwxYw|'||(} |tTurt7jdtV|}|j j,r!t[t]j/|r|j j0rtjddS|1r"tj|jj2pd dS| H| |j j3krtjddStj|jj2pd dStj|jj2dSdS)Nz --versionrF)r% ) option_groupspylintrcIzc-extension-no-member) config_file verbose_modezFNOTE: The 'pylint-config' command is experimental and usage can changez Jobs number (z&) should be greater than or equal to 0rz@concurrent.futures module is missing, fallback to single processjobswrrzHdo_exit is deprecated and it is going to be removed in a future version.)4printrr3rB_rcfile_output_pluginsverboserr stderrnextrfind_default_config_filesstr LinterClassrrHlinterload_default_pluginsload_plugin_modulesdisableenabler=r _arg_parserr warningswarn UserWarningr helprMr set_optionr7rr@outcheckgenerate_reportsOSErrorUNUSED_PARAM_SENTINELDeprecationWarningclear_cache_post_runr r clear_cache exit_zeroany_fail_on_issues msg_status fail_under) selfr>r@rBrDex default_filerYcodeoutput score_values r(__init__z Run.__init__ys) $   ,    HQKKK#' #' #% "  &tT22DD)    "3: & & & & HRLLLLLLLL  <  @ B BDIIL 1"<00 #// d # #,\ 0    f ##%%%""4=111s -...  ! B -f.@ A A A% D( 4<     !  MX   2&99D  F  &++-- HRLLL =  ! ! Z 2ZZZZ     HRLLL =  ! !V]%71%<%<"*V!!&!,,,,#q((%/\\ " < 4 $,g>>><&*0FO'LL&&&"("9"9";";K<<<<<<<<<<<<<<<   bsz****   LL    1133K / / / MZ"   D = - "       ! ! !  1}& 1 **,, 1/4155555(&-":::HQKKKKKHT[38q99999/00000 1 1sT A B%/BB;M 6M M MM MM N#*/NN#) r>r?r@rArBrCrDrrrE) __name__ __module__ __qualname____doc__rrXrHr=__annotations__rhrvr8r(r:r:gslKKKM).----)-, {1{1{1{1{1{1{1r8r:c"eZdZUdZdZded<dS)_PylintConfigRunz2A private wrapper for the 'pylint-config' command.Tr<r=N)rwrxryrzr=r{r|r8r(r~r~s.<<(,,,,,r8r~)rr)rr )- __future__rr/r3r_collections.abcrpathlibrtypingrrpylintrpylint.checkers.utilsr pylint.config._pylint_configr r #pylint.config.config_initializationr pylint.config.exceptionsr pylint.config.utilsrpylint.constantsrpylint.lint.base_optionsrpylint.lint.pylinterrrpylint.reporters.base_reporterrr1r ImportErrorconcurrent.futuresrr)r7objectrhr:r~r|r8r(rsj #""""" $$$$$$ 222222GFFFFF??????333333))))))66666622222222777777+++++++OOO6666666####L,M1M1M1M1M1M1M1M1`ss$( A33A=<A=BBB