"=GMHVdZddlmZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl m Z m Z mZmZmZmZddlZddlmZddlmZddlmZddlmZdd lmZdd lmZmZdd lmZm Z m!Z!dd l"m#Z#m$Z$m%Z%dd l&m'Z'ddl(m)Z)m*Z*ddl+m,Z,GddZ-Gddej.Z/Gdde/Z0Gdde/Z1e-j2e-j3e-j4gZ5e1de-j6e-j7e-j8e-j9e-j:ge5zdde1de-j;e-j<e-j=e-j>ge5zdde1de5d d!e1d"e-j<ge5zd#$e1d%e5d&d'e1d(e-j?e-j6e-j7e-j@e-j8e-j9e-j:e-jAe-j>e-jBe-jCe-jDe-jEe-jFge5zdd)e1d*e-j?e-j7e-j@e-j8e-j9e-j:e-jGe-jHe-j>e-jBg e5zdd+e1d,e-j7e-j@e-j8e-j9e-jIe-j:e-j>ge5zdd-e1d.e-j?e-j7e-j@e-jJe-j8e-j9e-j:e-jAe-jKe-jLe-jCe-jDe-jEg e5zdd/e1d0e-j;e-jMe-jNe-jOe-jPe-j9e-jQe-j:e-jRe-jSe-jTe-jUg e5zd1d2e1d3e-j7e-j@e-j8e-j9e-j:e-jVe-j>e-jEge5zdd4d5 ZW dSdTd=ZXd>\ZYZZZ[Gd?d@Z\dUdDZ]dVdGZ^dHdIdJdKZ_dWdXdNZ`ejabdOdPZcecrddQldmeZee`Zf dWdXdRZ`dSdS)Yz%Command-line support for coverage.py.) annotationsN)castAnyListNoReturnOptionalTuple)Coverage)env) HAS_CTRACER)CoverageConfig)DEFAULT_DATAFILE)combinable_filesdebug_data_file) info_header short_stackwrite_formatted_info)_BaseCoverageException_ExceptionDuringRunNoSource)PyRunner)Numbersshould_fail_under)__url__c jeZdZdZejddddZejdddd Zejdd dd Zejdd d dd d e e j Zejddd ddZejddd ddZejddd ddZejddd ddZejddd ddZejddd d d!Zejd"d#d d$d%Zejdd&d d'd(d)*Zejdd+d d,d-Z ejd.d/dd0Zejd1d2dd3Zejdd4d d5d6Zejd7d8dd9Zejd:d;dd<Zejd:d=dd>Zejdd?d d5d@ZejdAdd dBddCDZejdAdd dBddEDZejdAdd dBddFDZ ejddGddHZ!ejdIdJddKZ"ejddLd dMe#dN*Z$ejdOdPddQZ%ejddRd dSZ&ejdTddUZ'ejdVddWZ(ejdXdYdZd[\Z)ejd]dd^Z*ejd_d d`daZ+ejddbd dcddZ,ejddeddfZ-ejddgd dhdiZ.ejddjddkZ/dlS)mOptszBA namespace class for individual options we'll build parsers from.z-az--append store_truezGAppend coverage data to .coverage, otherwise it starts clean each time.)actionhelpz--keepz9Keep original coverage files, otherwise they are deleted.z--branchz:Measure branch coverage in addition to statement coverage.z --concurrencystoreLIBSzaProperly measure code using a concurrency library. Valid values are: {}, or a comma-list of them.z, )rmetavarrz --contextLABELz2The context label to record for this coverage run.z --contextszREGEX1,REGEX2,...ziOnly display data from lines covered in the given contexts. Accepts Python regexes, which must be quoted.z --data-fileDATAFILEzXBase name of the data files to operate on. Defaults to '.coverage'. [env: COVERAGE_FILE]INFILEzfRead coverage data for report generation from this file. Defaults to '.coverage'. [env: COVERAGE_FILE]OUTFILEz\Write the recorded coverage data to this file. Defaults to '.coverage'. [env: COVERAGE_FILE]z--debugOPTSz9Debug options, separated by commas. [env: COVERAGE_DEBUG]z-dz --directoryDIRzWrite the output files to DIR.z --fail-underMINfloatz?Exit with a status of 2 if the total coverage is less than MIN.)rr#typerz--formatFORMATz9Output format, either text (default), markdown, or total.z-hz--helpzGet help on this command.z-iz--ignore-errorsz)Ignore errors while reading source files.z --includez PAT1,PAT2,...zpInclude only files whose paths match one of these patterns. Accepts shell-style wildcards, which must be quoted.z-Lz--pylibzWMeasure coverage even inside the Python installed library, which isn't done by default.-mz--show-missingzEShow line numbers of statements in each module that weren't executed.--modulezb is an importable Python module, not a script path, to be run as 'python -m' would run it.z--omitzhOmit files whose paths match one of these patterns. Accepts shell-style wildcards, which must be quoted.z-ooutfilez=Write the XML report to this file. Defaults to 'coverage.xml')rdestr#rz?Write the JSON report to this file. Defaults to 'coverage.json'z?Write the LCOV report to this file. Defaults to 'coverage.lcov'z--pretty-printz"Format the JSON for human readers.z-pz--parallel-modez|Append the machine name, process id and random number to the data file name to simplify collecting data from many processes.z --precisionNzVNumber of digits after the decimal point to display for reported coverage percentages.z-qz--quietz-Don't print messages about what is happening.z--rcfilezSpecify configuration file. By default '.coveragerc', 'setup.cfg', 'tox.ini', and 'pyproject.toml' are tried. [env: COVERAGE_RCFILE]z--show-contextsz Show contexts for covered lines.z--skip-coveredzSkip files with 100% coverage.z--no-skip-covered store_false skip_coveredzDisable --skip-covered.)rr1rz --skip-emptyzSkip files with no code.z--sortCOLUMNzbSort the report by the named column: name, stmts, miss, branch, brpart, or cover. Default is name.z--sourcez SRC1,SRC2,...z=A list of directories or importable names of code to measure.z--timidzXUse a simpler but slower trace method. Try this if you get seemingly impossible results!z--titleTITLEz.A text string to use as the title on the HTML.z --versionz%Display version information and exit.N)0__name__ __module__ __qualname____doc__optparse make_optionappendkeepbranchformatjoinsortedr CONCURRENCY_CHOICES concurrencycontextcontextscombine_datafileinput_datafileoutput_datafiledebug directory fail_underr ignore_errorsincludepylib show_missingmoduleomit output_xml output_json output_lcovjson_pretty_print parallel_modeint precisionquietrcfile show_contextsr4no_skip_covered skip_emptysortsourcetimidtitleversion/srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/coverage/cmdline.pyrr#sLL "X ! j VF 8  H\ H   D"X ! J| IF'(& OGV = &66."DEEFF G G K#h" K AG$x# L2E <H,x+ M': <*X) M'8 <N+h* M'9 <O !H  Igv H   E%$ mGU -I&% N7E NJ"X ! Jw HF 8  h| (   D)H(  8M#h" K CG !H  i  +   E(8' | TL"X ! j 5F 8  HWo C   D&% by) LJ'(& by) NK'(& by) NK-, \ 1)H(   M%$ M'3S -I !H  i <   E"X ! Jw AF)H(, /M(8' -L+h*M &O&%| 'J 8 (    D"X ! Jw LF !H  Il ,   E !H  Igw =   E#h" K 4GGGrercTeZdZdZdfd ZGdd eZdfd ZddZxZ S)CoverageOptionParserz|Base OptionParser for coverage.py. Problems don't exit the program. Defaults are initialized for all options. argsrkwargsreturnNonec<d|d<tj|i||jd#iddddddddddddd dd dd dd dd dddddddddddddddddddddddddddddddddddd dd!dd"d|dS)$NFadd_help_optionrr=r?rDrErF data_filerJrKrLr@rrMrNr>rQrRrWrYrOrZr[Tr\rPr4r^r_r`rarbrcrd)super__init__ set_defaultsdisable_interspersed_args)selfrirj __class__s rfrqzCoverageOptionParser.__init__s$) !$)&)))! ! ! 4! 4! 4 !  ! D ! T! d! $! d! t! 4! ! $! D! !! "4#! $%! &$'! (d)! *$+! ,$-! .4/! 0$1! 23! 45! 6t7! 89! :4;! <$=! >$?! @DA! ! F &&(((((receZdZdZdS)&CoverageOptionParser.OptionParserErrorz;Used to stop the optparse error handler ending the process.N)r7r8r9r:rdrerfOptionParserErrorrwsII rerx List[str]1Tuple[bool, Optional[optparse.Values], List[str]]c t|\}}n#|j$rddgfcYSwxYwd||fS)zUCall optparse.parse_args, but return a triple: (ok, options, args) FNT)rp parse_argsrx)rtrioptionsrus rf parse_args_okz"CoverageOptionParser.parse_args_oksb  #!GG..t44MGTT% # # #$? " " " #Wd""s $(::msgstrrc.t||j)z7Override optparse.error so sys.exit doesn't get called.) show_helprx)rtrs rferrorzCoverageOptionParser.error+s#$$re)rirrjrrkrl)riryrkrz)rrrkr) r7r8r9r:rq Exceptionrxr~r __classcell__rus@rfrhrhs&)&)&)&)&)&)P     I    # # # # # #%%%%%%%%rerhc$eZdZdZdfd ZxZS)GlobalOptionParserz)r)rtrs rf__eq__zCmdOptionParser.__eq__Ys8TX88889rec\t}|d|jS)z>Override of an undocumented function in optparse.OptionParser. )rp get_prog_namer)rt program_namerus rfrzCmdOptionParser.get_prog_name`s0ww,,.. +++++rer)rrr}rrrrr)rrrkr)rkr) r7r8r9r:rqr__hash__rrrs@rfrr=s>> $ 2:::: H,,,,,,,,,,rerannotatez[options] [modules]z|Make annotated copies of the given files, marking statements that are executed with > and statements that are missed with !.rcombinez%[options] ... a&Combine data from multiple coverage files. The combined results are written to a single file representing the union of the data. The positional arguments are data files or directories containing data files. If no paths are provided, data files in the default data file's directory are combined.rJzaBDisplay information about the internals of coverage.py, for diagnosing problems. Topics are: 'data' to show a summary of the collected data; 'sys' to show installation information; 'config' to show the configuration; 'premain' to show what is calling coverage; 'pybehave' to show internal flags describing Python behavior.erasez)Erase previously collected coverage data.)rrz [command]zDescribe how to use coverage.pyhtmlzCreate an HTML report of the coverage of the files. Each file gets its own page, with the source decorated to show executed, excluded, and missed lines.jsonz+Generate a JSON report of coverage results.lcovz,Generate an LCOV report of coverage results.reportz&Report coverage statistics on modules.runz$[options] [program options]z/Run a Python program, measuring code execution.xmlz+Generate an XML report of coverage results.) rrrJrrrrrrrrrrtopicparserOptional[optparse.OptionParser]rkrlc|s|s|sJtjd}|tjjdzrtj|}tj|}tj r/d}||r|dt| }ttj }t|d<||d<trd|d<nd |d<|r;t!|tj t!d |d tj n|rBt!|t!nr|Jt)jt,|d }|rt!|jdi|nt!d|t!djdi|dS)z-Display an error message, or the named topic.rz __main__.pyz -script.pyNrrzwith C extensionextension_modifierzwithout C extension)filezUse 'z help' for help.r zDon't know topic z"Full documentation is at {__url__}rd)sysargvendswithospathsepdirnamebasenamer WINDOWSlendictcoverage__dict__rr printstderr format_helpstriptextwrapdedent HELP_TOPICSgetr@)rrr program_pathr auto_suffix help_paramshelp_msgs rfrr*s #E#V## #8A;LRW[=8995w|44 7##L11L {< #   - - <'(:#k*:*:):(:;Lx())K$K ".KB,> ()),A () 1 e#*%%%% 4l4443:FFFFF  1 f  ""((**+++    ?;??5"#=#=>>DDFF  1 /(/00K00 1 1 1 1 /e// 0 0 0 5 . 5 D D D DEEEEEre)rc:eZdZdZddZddZddZddZddZdS)CoverageScriptz*The command-line interface to coverage.py.rkrlcd|_|dS)NF) global_option)rts rfrqzCoverageScript.__init___s" rerryrXc |stdtS|dd|_|jrt }nKt |d}|std|dtS|dd}||\}}}|stS|J| |||rtSt|j }t|j }t|j }t|j} t|j} |j|jd} nd} t%|jpt(|j|j|j|j|j|||| | d |j|j |_|jd kr||S|jd kr |jtS|jd kr| ||S|jdkrs|j!r|j"|pd} |j#| d tI|j%|j&tStOtQ||j)||| } tTj+,dd|j"d}|jdkr8|jj-d$|j.|j/|j0|j1|j2|j3d| }n|jdkr|jj4d$d|j5i| n|jdkr8|jj6d$|j5|j.|j0|j1|j7|j8d| }n|jdkr |jj9d$|j:|j1d| }n]|jdkr&|jj;d$|j:|j<|j7d| }n,|jdkr|jj=d$d|j:i| }nt|| |j? |j@d|j?|j. |j@d|j.tt|jCd}tt|jCd}t|||rPd 3t|!G|||"}td#|tStS)%zThe bulk of the command line interface to coverage.py. `argv` is the argument list to process. Returns 0 if all is well, 1 if something went wrong. minimum_helprr-zUnknown command: rN,T)ro data_suffix cover_pylibrar? config_filer`rRrNrJrDcheck_preimportedrEmessagesrJrrr)strictr>)morfsrMrRrNrFr r)rYrPr4r^r_ output_formatrrKr)rKrYr4r^r\rbr)r0r^r)r0 pretty_printr\rr0zreport:fail_underzreport:precisionz;total of {total} is less than fail-under={fail_under:.{p}f})rY)totalrLpzCoverage failure:rd)JrOK startswithrrCOMMANDSrERRr~do_help unshell_listr`rRrNrJrFrDsplitr rorrWrOrar?r[rErZrrdo_debugrdo_runr=loadrrr>saver unglob_argsrMrrinsertrrYrPr4r^r_r@rrK html_reportr\rb xml_reportr0 json_reportr lcov_reportAssertionErrorrL set_optionrr+ get_optionrXrrdisplay_coveredr FAIL_UNDER)rtrrokr}rir`rRrNrJrFrD data_paths report_argsrrLrYrs rf command_linezCoverageScript.command_linecs  N + + + +I "!W//44   '))FF\\$q'**F 9d1g99::: 8D"0066GT J""" <<v . . Ign--GL))w//W]++ 011   *!-33C88KKK!';+;- ->#"O &    " >W $ $==&& & ^w & & M   ! ! !I ^u $ $;;w-- - ^y ( (~ % ""$$$J M ! !*TW\@R@R ! S S S M   Id##!/     2  >X % %(DM(!+$1$1"-\%n EE^z ) ) "DM " N NW-> N+ N N N N ^v % %-DM-!+!+$1"-%3m EE^u $ $,DM,"-EE ^v % %-DM-$1%3 EE ^v % %-DM-EE !  !- (()PQQQ , (();W=NOOOeT]%=%=>Q%R%RSSJS$-":":;M"N"NOOI  I>> "SZZ!I666FFuMM)[ )3///!! rer}optparse.Valuesriroptparse.OptionParserrc^|jr*|jrtdnt|dS|jdkrW|rC|D]?}t|}|t|/t|@ntddS|jrtddSdS)z`Deal with help requests. Return True if it handled the request, False if not. rr)rTNrcF)rrrrrrrc)rtr}rira parser_maybes rfrzCoverageScript.do_helps < ! )'''''((((4 >V # # (++A#+<<??L#/!66666!***** +''''4 ?  I & & & &4urecZ|s}|jrtdtStt|jd}|1tj|}|r|ddvrd|_|dd}|stdtS|j r0|jd rtd tS|j d kr4d D]1}t||td d|dztcS2dtj d<t|t|j}||j r|j|jd} |n#t($rd}wxYw |j|r|jn:#|j|r|jwwxYwt.S)z!Implementation of 'coverage run'.zNo module specified for -mzrun:command_lineNr>r.r/TrzNothing to do.z run:parallelz,Can't append to data files in parallel mode.multiprocessing)r?rNrRrOr`razROptions affecting multiprocessing must only be specified in a configuration file. z Remove --z from the command line.true COVERAGE_RUN) as_moduleF)rQrrrrrrshlexrr=rDgetattrrenvironrrpreparerstartrrstoprr)rtr}riropt_namerunnercode_rans rfrzCoverageScript.do_run-sp $~ 6777 T]%=%=>P%Q%QRRL'{<00$DG'999%)GN8D  & ' ' 'J > dm66~FF  D E E EJ  "3 3 3V  7H--95EHEEEF JJJ :&, >"$$w~*>*>??? > ! M     % JJLLLL   H    M    % ""$$$ M    % ""$$$$ % sF%$G,%F33G,,7H#c|stdtS|ddrtdtS|ddkr/ttd|jnO|ddkrmtt d|jjj}t|t|D] }tdt|!n|dd kr3ttd |jj n|dd kr8tt d ttnS|dd kr(ttd tj ntd |dtStS) z#Implementation of 'coverage debug'.zFWhat information would you like: config, data, sys, premain, pybehave?rNz Only one topic at a time, pleaserrdataz-----configpremainpybehavezDon't know what you mean by )rrrrrsys_inforr rorr debug_inforr r)rtrirofilenames rfrzCoverageScript.do_debughs  ^ _ _ _J 8  8 9 9 9J 7e   t}/E/E/G/G H H H H !W   +f%% & & & ,6I I & & &,Y77 * *g)))) *!W $-2F2Q2Q2S2S T T T T !W ! ! +i(( ) ) ) +-- !W " "  CN4D4D E E E E @T!W@@ A A AJ reNr)rryrkrX)r}rriryrrrkr)r}rriryrkrX)riryrkrX) r7r8r9r:rqrrrrrdrerfrr\s44    bbbbH$$$$L9999vrersrOptional[List[str]]cv|sdStjr|d}|dS)z)Turn a command-line argument into a list.N'r)r rrr)rs rfrrs: t { GGCLL 773<<reriryctjrNg}|D]G}d|vsd|vr(|tj|2||H|}|S)z5Interpret shell wildcards for platforms that need it.?*)r rextendglobr=)riglobbedargs rfrrsm { $ $CczzSCZZty~~....s#### Krea Coverage.py, version {__version__} {extension_modifier} Measure, collect, and report on code coverage in Python programs. usage: {program_name} [options] [args] Commands: annotate Annotate source files with execution information. combine Combine a number of data files. debug Display information about the internals of coverage.py erase Erase previously collected coverage data. help Get help on using coverage.py. html Create an HTML report. json Create a JSON report of coverage results. lcov Create an LCOV report of coverage results. report Report coverage stats on modules. run Run a Python program and measure code execution. xml Create an XML report of coverage results. Use "{program_name} help " for detailed help on any command. zjCode coverage for Python, version {__version__} {extension_modifier}. Use '{program_name} help' for help.z7Coverage.py, version {__version__} {extension_modifier})rrrcr Optional[int]c|tjdd} t|}n#t$r$}t j|jt}Yd}~nfd}~wt$r-}|jd}t|t}Yd}~n1d}~wt$r!}|jr|jd}nd}Yd}~nd}~wwxYw|S)z\The main entry point to coverage.py. This is installed as the script entry point. Nrr) rrrrr tracebackprint_exceptionrirrr SystemExit)rstatuserrrs rfmainr%s  |x|!!..t44  !38,, !hqk c   8 Xa[FFF  Ms-!: CA## C0#B C%CCCOVERAGE_PROFILEr )SimpleLauncherc tj} t||dd\}}t ||ddd|S#|dd\}}t ||ddd|wxYw)z$A wrapper around main that profiles.rd) re_filter max_recordsr )querylimitrcol)r'launch original_mainr,rshowcancel)rprofilerr _s rfr%r%s"(**  &&nnzsnKKGD! (--d#22-FF G G G OO    nnzsnKKGD! (--d#22-FF G G G OO    s A88AC)NNN)rrrrrrrkrl)rrrkr)riryrkryr)rrrkr)gr: __future__rrr;ros.pathrrrr typingrrrrrr rr r coverage.collectorr coverage.configr coverage.controlr coverage.datarrcoverage.debugrrrcoverage.exceptionsrrrcoverage.execfilercoverage.resultsrrcoverage.versionrr OptionParserrhrrrJrr[ GLOBAL_ARGSrKrHrMrNrRr=rGr>rZrFrLrYr\r4r]r^rbrTrVrUr@r_rPr?rDrErIrQrOrWr`rarSrrrrrrrrrr%rr_profileox_profile.core.launchersr'r0rdrerfrEs(,+""""""   ================************------;;;;;;;;IIIIIIIIIIUUUUUUUUUU&&&&&&77777777$$$$$$ EEEEEEEEPC%C%C%C%C%80C%C%C%L      -    (,(,(,(,(,*(,(,(,b JIK   N     L I     $ <  K  ! I J      6 &&_ P   _  !  @  O 5    O M N   O   L I N J      O J   $ 4)   4 O M   O   L I    " J    $A   $ O   O   L   I J  $B   o M   O K   L I N I      O  $<%* ? K K   L  L K I J   K J  5E#   ( ?   O   L I O J O  $A   Kt t p .2,F,F,F,F,F^CjjjjjjjjZ         . .I9 @B :>>,b 1 1 888888M%)        re