L i"TdZddlmZddlZddlZddlZddlZddlZddlZddl Zddl Z ddl Z ddl Z ddl Z ddlZddlZddlmZmZddlmZddlmZmZmZmZddlmZddlmZdd lmZdd l m!Z!m"Z"dd l#m$Z$m%Z%dd l&m'Z'm(Z(dd l)m*Z*m+Z+ddl,m-Z-m.Z.m/Z/m0Z0m1Z1ddl2m3Z3ddl4m5Z5m6Z6m7Z7m8Z8ddl9m:Z:m;Z;mm?Z?ddl@mAZAddlBmCZCddlDmEZEddlFmGZGmHZHmIZImJZJmKZKddlLmMZMddlNmOZOddlPmQZQddlRmSZSmTZTddlUmVZVddlWmXZXddlYmZZZddl[m\Z\m]Z]ddl^m_Z_m`Z`maZambZbmcZcmdZdmeZemfZfdd lgmhZhdd!limjZjeJeZejd2d#ZleGd$ZmemZnd%ZoGd&d"eaZpeqejd'dr dd(l,msZsmtZtesetd)*d+g,epZpd-d.d3d/Zud4d0Zvd4d1Zwy)5z&Central control stuff for coverage.py.) annotationsN)IterableIterator) FrameType)IOAnyCallablecast)env)AnnotateReporter) Collector)CoverageConfigread_coverage_config)combine_context_switchers"should_start_context_test_function) CTRACER_FILECore) CoverageDatacombine_parallel_data) DebugControl NoDebuggingrelevant_environment_display short_stackwrite_formatted_info)disposition_debug_msg) ConfigErrorCoverageExceptionCoverageWarning PluginError) PathAliasesabs_filerelative_filenameset_relative_directory) HtmlReporter)InOrOut) JsonReporter) LcovReporter) DefaultValue bool_or_noneensure_dir_for_fileisolate_module join_regex)patch_multiprocessing) apply_patches) FileReporter)Plugins TCoverageInit)PythonFileReporter)SummaryReporter) render_report)Analysisanalysis_from_file_reporter)FilePathTConfigSectionIn TConfigurableTConfigValueInTConfigValueOutTFileDispositionTLineNoTMorf)__url__) XmlReporterCoveragec+K|j}|jj|_ |jjdi|d||_y#||_wxYww)zTemporarily tweak the configuration of `cov`. The arguments are applied to `cov.config` with the `from_args` method. At the end of the with-statement, the old configuration is restored. N)configcopy from_args)covkwargsoriginal_configs V/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/coverage/control.pyoverride_configrKMsPjjO"CJ% &v& $ _ s,A# AA# A  A#MISSINGz:data:ceZdZUdZgZded<ed6dZedddddddddddddddddf d7dZ d8d Z d8d Z d8d Z d9d Z d:d Zd;ddZd?dZd8dZd8dZd@dZd8dZd8dZej2dAdZdBdCdZdDdZd8dZdEdZdFdGdZdFdHdZ d8dZ!dIdZ"dFdJd Z#d8d!Z$dKd"Z% dL dMd#Z&dNd$Z'd8d%Z(dOd&Z) dPd'Z*e+jXd()dQd*Z-dRd+Z.e+jXd()dSd,Z/ dT dUd-Z0d8d.Z1 dV dWd/Z2 dX dYd0Z3 dV dZd1Z4 d[ d\d2Z5 d] d^d3Z6 dX d_d4Z7d`d5Z8y)arAaProgrammatic access to coverage.py. To use:: from coverage import Coverage cov = Coverage() cov.start() #.. call your code .. cov.stop() cov.html_report(directory="covhtml") A context manager is available to do the same thing:: cov = Coverage() with cov.collect(): #.. call your code .. cov.html_report(directory="covhtml") Note: in keeping with Python custom, names starting with underscore are not part of the public API. They might stop working at any point. Please limit yourself to documented methods to avoid problems. Methods can raise any of the exceptions described in :ref:`api_exceptions`. zlist[Coverage] _instancesc:|jr|jdSy)zGet the latest started `Coverage` instance, if any. Returns: a `Coverage` instance, or None. .. versionadded:: 5.0 N)rN)clss rJcurrentzCoverage.currents >>>>"% %NFTcLt|_|du|_t|trd}|t j |}d|_|x|_|_ ||_ d|_ d|_ ||_ t|_||_d|_g|_t'|_d|_t-|_t1t2t4dz||_d|_g|_d|_d|_d|_ tB|_"dx|_#|_$i|_%d|_&d|_'d|_(d|_)d|_*t|tVr@|jYtZr+tj\|t_tZd|_nyt|t`st j |}tcdid|d|jdd|d|d|d |d tg|d |d | d | d| d| d| d| d| d|d||_thjjs tmyy)a[ Many of these arguments duplicate and override values that can be provided in a configuration file. Parameters that are missing here will use values from the config file. `data_file` is the base name of the data file to use. The config value defaults to ".coverage". None can be provided to prevent writing a data file. `data_suffix` is appended (with a dot) to `data_file` to create the final file name. If `data_suffix` is simply True, then a suffix is created with the machine and process identity included. `cover_pylib` is a boolean determining whether Python code installed with the Python interpreter is measured. This includes the Python standard library and any packages installed with the interpreter. If `auto_data` is true, then any existing data file will be read when coverage measurement starts, and data will be saved automatically when measurement stops. If `timid` is true, then a slower and simpler trace function will be used. This is important for some environments where manipulation of tracing functions breaks the faster trace function. If `branch` is true, then branch coverage will be measured in addition to the usual statement coverage. `config_file` determines what configuration file to read: * If it is ".coveragerc", it is interpreted as if it were True, for backward compatibility. * If it is a string, it is the name of the file to read. If the file can't be read, it is an error. * If it is True, then a few standard files names are tried (".coveragerc", "setup.cfg", "tox.ini"). It is not an error for these files to not be found. * If it is False, then no configuration file is read. `source` is a list of file paths or package names. Only code located in the trees indicated by the file paths or package names will be measured. `source_pkgs` is a list of package names. It works the same as `source`, but can be used to name packages where the name can also be interpreted as a file path. `source_dirs` is a list of file paths. It works the same as `source`, but raises an error if the path doesn't exist, rather than being treated as a package name. `include` and `omit` are lists of file name patterns. Files that match `include` will be measured, files that match `omit` will not. Each will also accept a single string argument. `debug` is a list of strings indicating what debugging information is desired. `concurrency` is a string indicating the concurrency library being used in the measured code. Without this, coverage.py will get incorrect results if these libraries are in use. Valid strings are "greenlet", "eventlet", "gevent", "multiprocessing", or "thread" (the default). This can also be a list of these strings. If `check_preimported` is true, then when coverage is started, the already-imported files will be checked to see if they should be measured by coverage. Importing measured files before coverage is started can mean that code is missed. `context` is a string to use as the :ref:`static context ` label for collected data. If `messages` is true, some messages will be printed to stdout indicating what is happening. If `plugins` are passed, they are an iterable of function objects accepting a `reg` object to register plugins, as described in :ref:`api_plugin`. When they are provided, they will override the plugins found in the coverage configuration file. .. versionadded:: 4.0 The `concurrency` parameter. .. versionadded:: 4.2 The `concurrency` parameter can now be a list of strings. .. versionadded:: 5.0 The `check_preimported` and `context` parameters. .. versionadded:: 5.3 The `source_pkgs` parameter. .. versionadded:: 6.0 The `messages` parameter. .. versionadded:: 7.7 The `plugins` parameter. .. versionadded:: 7.8 The `source_dirs` parameter. NTF config_filewarn data_file cover_pylibtimidbranchparallelsource source_pkgs source_dirsrun_omit run_includedebug report_omitreport_include concurrencycontextrC)7rrD_no_disk isinstancer(osfspath _debug_file _auto_load _auto_save_data_suffix_specified _warn_no_data_warn_unimported_source_warn_preimported_sourceset_no_warn_slugs _messages_make_pth_file _warningsr_debug_inoroutr0_pluginsr rr1_plugin_override_data_data_to_close_core _collector_metacovr! _file_mapper _data_suffix _run_suffix _exclude_re _old_sigterm_inited_inited_for_start_started_should_write_debugstr startswithCONFIG_DATA_PREFIX deserializelenboolr_warnr)r METACOV _prevent_sub_process_measurement)selfrW data_suffixrX auto_datarYrZrUr\r]r^omitincluderardcheck_preimportedremessagespluginss rJ__init__zCoverage.__init__s_z%& "T) i .I   ),I,0,55$/&1#"'+$(9%(+!#%'%0M (, !( $Xm%B ?$(DKK  ;; % % 1D   ,  MM - -d.C.C D MM * *4;;+>+> Lmm// HF   dDKK0TYY[1AA1EF G  HrSc|jrd|_|j|jjrC|jjt vr"t d|jjyy)z,Stuff to do after everything is initialized.FzCrashing because called by N)r_write_startup_debugrD_crashr RuntimeErrorrs rJ _post_initzCoverage._post_initsh  # #',D $  % % ' ;;  $++"4"4 "E! ) ! !s FGG%c|jJ|jj||}|jjdr$|jj t ||S)zDecide whether to trace execution in `filename`. Calls `_should_trace_internal`, and returns the FileDisposition. trace)rw should_tracervrrr)rfilenameframedisps rJ _should_tracezCoverage._should_tracesY }}(((}}))(E: ;;  g & KK  3D9 : rSc|jJ|jj||}|jjdr+|sd|}nd|d|}|jj || S)zCheck a file name against the include/omit/etc, rules, verbosely. Returns a boolean: True if the file should be traced, False if not. rz Including zNot including z: )rwcheck_include_omit_etcrvrr)rrrreasonmsgs rJ_check_include_omit_etcz Coverage._check_include_omit_etcsw }}(((55hF ;;  g &"8,/&xl"VH= KK  c "zrSc|js$t|jj|_||jvry|jj ||r|d|dt d|}|jjdrdtjd|}tj|td |r |J|jj|yy) zUse `msg` as a warning. For warning suppression, use `slug` as the shorthand. If `once` is true, only show this warning once (determined by the slug.) Nz (z); see z/messages.html#warning-pid[z] r)category stacklevel)rrrqrDdisable_warningsruappendr?rvrrhgetpidwarningsrVradd)rrslugonces rJrzCoverage._warns"""%dkk&B&B"CD  4&& &  c" ED6 1HOC ;;  e $biik]"SE*C cOB # ##    # #D ) rSc4|jr t|yy)z4Write a message to the user, if configured to do so.N)rsprint)rrs rJ_messagezCoverage._messages >> #J rSc8|jj|S)aGet an option from the configuration. `option_name` is a colon-separated string indicating the section and option name. For example, the ``branch`` option in the ``[run]`` section of the config file would be indicated with `"run:branch"`. Returns the value of the option. The type depends on the option selected. As a special case, an `option_name` of ``"paths"`` will return an dictionary with the entire ``[paths]`` section value. .. versionadded:: 4.0 )rD get_option)r option_names rJrzCoverage.get_options {{%%k22rSc<|jj||y)ahSet an option in the configuration. `option_name` is a colon-separated string indicating the section and option name. For example, the ``branch`` option in the ``[run]`` section of the config file would be indicated with ``"run:branch"``. `value` is the new value for the option. This should be an appropriate Python value. For example, use True for booleans, not the string ``"True"``. As an example, calling: .. code-block:: python cov.set_option("run:branch", True) has the same effect as this configuration file: .. code-block:: ini [run] branch = True As a special case, an `option_name` of ``"paths"`` will replace the entire ``[paths]`` section. The value should be a dictionary. .. versionadded:: 4.0 N)rD set_option)rrvalues rJrzCoverage.set_options< {E2rSc|j|j|jj|jjxr4t j j|jj }|s|jd|j|s)|jJ|jjyy)z;Load previously-collected coverage data from the data file.Nsuffix) rr}resetrDr[rhpathexistsrW _init_datarrzread)r should_skips rJloadz Coverage.load&s ?? & OO ! ! #kk**X277>>$++BWBW3X/X  OO4O ( ::) )) JJOO rSc z|jj}d|vrA|jj tdt |jj|jj }|r|dk(rg}n|dk(rt g}ntd||jd|jjDt|}t|j|jjd r |jnd|j|du|j |_t#|j |j$|j&||j(|jj*|j| |_|j.}|rt1|t2s|jj@r|j jBs|jd jEdjGd|jj@D|j,jI|jj@D] }d|_% tM|j|j|jjdr |jnd|jjN|_(|j|jP_)|j jT|jP_+d |_,t[j\|j^|jj`rqtcjdtcjfk(}|rEthjjs4tmjltljn|jp|_9yyyy)zInitialization for start()rNz-multiprocessing requires a configuration file)rcfilenone test_functionz*Don't understand dynamic_context setting: c34K|]}|jywN)dynamic_context.0rs rJ z+Coverage._init_for_start..Ds! '-F " "! core)rVrarDdynamic_contextsmetacov)rr check_includeshould_start_context file_mapperrZrVrdTz1Plugin file tracers ({}) aren't supported with {}z, c34K|]}|jywr)rrs rJrz+Coverage._init_for_start..rs9?44rFr)rDrVrainclude_namespace_packages):rDrdrUrr-rrextendrxcontext_switchersrrrrvrr~r|r rrrrZr}rmrgrr[rrrzuse_datare file_tracerssupports_pluginsformatjoin tracer_name_coverage_enabledr%rrwrfile_disposition_class disp_classratexitregister_atexitsigterm threadingcurrent_thread main_threadr WINDOWSsignalSIGTERM _on_sigtermr)rrddyconrrrris_mains rJ_init_for_startzCoverage._init_for_start3sL"&!8!8  +{{&&.!"QRR !)@)@ A ++ "  o %!C D  J5)TU U  ! 151P1P!   99JK"&++"4"4V"<4;;$;;2$>MM   $++66!5));;%%#  ,, fc* [[ ! !~,fF zz%%%   T[[-@-@A == % %djj.I.I JJCJJIICG==C]C]OO//1  --44 1+0( 1 ;;"&++"4"4W"=4;;4'+{{'M'M   !%  #'::#D#D  $(   % ;;   //1Y5J5J5LLGs{{%+MMNN$$%! +w rSc4|jt|jjt |jj||j |j |j|_|jj|jyy)z,Create a data file if we don't have one yet.N)basenamerrVrano_disk) rzr*rDrWrrrvrfr{r)rrs rJrzCoverage._init_datasp ::   5 5 6%..ZZkk DJ    & &tzz 2 rScL|j|jsd|_|j|j|jJ|j J|j j |jr|j j|jr|jt||j|j|j|jjd|_|j"j%|y)aStart measuring code coverage. Coverage measurement is only collected in functions called after :meth:`start` is invoked. Statements in the same scope as :meth:`start` won't be measured. Once you invoke :meth:`start`, you must also call :meth:`stop` eventually, or your process might not shut down cleanly. The :meth:`collect` method is a context manager to handle both starting and stopping collection. TN) make_pth_file)rrrrr}rwwarn_conflicting_settingsrpwarn_already_imported_filesrkrr.rDrvrtstartrrNrrs rJrzCoverage.starts %%%)D "  " ***}}((( //1  ( ( MM 5 5 7 ?? IIKdDKKDDWDWX   t$rSc|jr+|jd|ur|jj|jr(|jJ|jj d|_y)zStop measuring code coverage.rPNF)rNpoprr}stoprs rJrz Coverage.stopsX ??r"d*##% ==??. .. OO " rSc#K|j d|jy#|jwxYww)ziA context manager to start/stop coverage measurement collection. .. versionadded:: 7.3 N)rrrs rJcollectzCoverage.collects+    IIKDIIKs>)>;>cd|jjdr5|jj|dtjd||j r|j |js|dk(r|j|jD]}|jdy)zClean up on process shutdown.rz: pid: z , instance: rTforceN) rvrrrhrrrrlsaver{close)reventds rJrzCoverage._atexits ;;  i ( KK  wryy{m<xP Q == IIK ??ey0 IIK$$ A GG$G  rSc|jdtjtj|jt j t j tjy)zA handler for signal.SIGTERM.rN)rr rrrhkillr)r signum_unused frame_unuseds rJrzCoverage._on_sigterms@ Y  fnnd&7&78  V^^,rScL|j|j|j|jj|j d|j J|j j |jjd|_d|_ y)zErase previously collected coverage data. This removes the in-memory data collected in this session as well as discarding the data file. Nr)r[F) rrr}rrrzeraserDr[rrs rJr,zCoverage.erases}   ?? & OO ! ! # t$zz%%% $++"6"67 !&rSc|js td|jJ|jjr|j ddd|jj |y)aSwitch to a new dynamic context. `new_context` is a string to use as the :ref:`dynamic context ` label for collected data. If a :ref:`static context ` is in use, the static and dynamic context labels will be joined together with a pipe character. Coverage collection must be started already. .. versionadded:: 5.0 z.Cannot switch context, coverage is not startedNzConflicting dynamic contextszdynamic-conflictT)rr)rrr}rrswitch_context)r new_contexts rJr.zCoverage.switch_contexts[}}#$TU U*** ?? / / JJ5t|jjdr|jjnd|jj }|jj jD]#}|d}|ddD]}|j||%|S)z,Create a PathAliases from our configuration.pathmapN)debugfnrelativer) r rvrrrDrpathsvaluesr)raliasesrKresultpatterns rJ _make_aliaseszCoverage._make_aliasesRs*.++*<*  t$  zz%%% JJ&&(!MM  rScx|j|jd|j|jc|jD]*}|j r|jj |,|jjr|j|jJ|jS)zGet the collected data. Also warn about various problems collecting data. Returns a :class:`coverage.CoverageData`, the collected coverage data. .. versionadded:: 4.0 Nr) rrrr}rxrplugin_was_disabled flush_data_post_save_workrzrs rJrDzCoverage.get_datas  t$  ?? &-- @//OO77? @))+$$&zz%%%zzrSc|jJ|jJ|jr|jj|js|jr|j ddt jt}|jjD]*\}}|j|}||j|,|jD]!\}}|jj||#y)zAfter saving data, look for warnings, post-work, etc. Warn about things that should have happened but didn't. Look for un-executed files. NzNo data was collected.zno-data-collected)r)rzrwrowarn_unimported_sourcernr collections defaultdictrAfind_possibly_unexecuted_filesrritems touch_files)r file_paths file_path plugin_namerKs rJrZzCoverage._post_save_workszz%%%}}(((  ' ' MM 0 0 2zzd00 JJ/6IJ J!,,T2 &*mm&R&R&T 6 "I{)))4I { # * *9 5 6#-"2"2"4 7 K JJ " "5+ 6 7rSc<|j|\}}}}}||||fS)z:Like `analysis2` but doesn't return excluded line numbers.) analysis2)rmorffs_mmfs rJanalysiszCoverage.analysiss(-1aB!Q{rSc|j|}|jt|jt|jt|j |j fS)aGAnalyze a module. `morf` is a module or a file name. It will be analyzed to determine its coverage statistics. The return value is a 5-tuple: * The file name for the module. * A list of line numbers of executable statements. * A list of line numbers of excluded statements. * A list of line numbers of statements not run (missing from execution). * A readable formatted string of the missing line numbers. The analysis uses the source file itself and the current measured coverage data. )_analyzersorted statementsexcludedmissingmissing_formattedrrgrms rJrfzCoverage.analysis2s[(==&    8&& ' 8$$ % 8## $  & & (   rSrJ)maxsizec|j|j|j}|j|}|j |j }t ||jj||S)z+Analyze a module or file. Private for now.) rrrD_get_file_reporterrrr6rD precision)rrgrE file_reporterrs rJrozCoverage._analyzesd  }}//5 $$]%;%;<*41F1F W_``rScD|j|}|jS)zGet branch statistics about a module. `morf` is a module or a file name. Returns a dict mapping line numbers to a tuple: (total_exits, taken_exits). .. versionadded:: 7.7 )ro branch_statsrus rJr|zCoverage.branch_statss!==&$$&&rSc|jJd}d}t|tr|j|}|jj |}|rU|j j |}|r8|j|}|%tdj|j||dk(r t||}t|tsJ|S)z-Get a FileReporter for a module or file name.Npythonz5Plugin {!r} did not provide a file reporter for {!r}.) rzrgrr file_tracerrxgetrzrrrr2r/)rrgrrz mapped_morfrds rJrxzCoverage._get_file_reporterszz%%%,4 dC ++D1K**00=K**;7$*$8$8$EM$,)SZZ & < < $ H $.tT:M-666rSc|jJ|s|jj}t|ttt fs|g}t |d}|Dcgc]}|j||fc}Scc}w)aGet FileReporters for a list of modules or file names. For each module or file name in `morfs`, find a FileReporter. Return a list pairing FileReporters with the morfs. If `morfs` is a single module or file name, this returns a list of one FileReporter. If `morfs` is empty or None, then the list of all files measured is used to find the FileReporters. c>t|tr|S|jSr)rgr__name__)rks rJz.Coverage._get_file_reporters..0sAs1CArS)key)rzmeasured_filesrgrAtuplerqrprx)rmorfsrgs rJ_get_file_reporterszCoverage._get_file_reportersstzz%%%JJ--/E%$s!34GEu"STBGH$((.5HHHsA8c<|jjrt|j|jd}|j 5|j |j |jj||_|jj|yy)zARe-map data before reporting, to get implicit "combine" behavior.T)rVrarN)map_path) rDrKrrrvrzupdaterPmapr{r)r mapped_datas rJ_prepare_data_for_reportingz$Coverage._prepare_data_for_reporting3sv ;;  &DJJdkkSWXKzz%""4::8J8J8L8P8P"Q$DJ    & &{ 3 rSc |jt|||||||| | | |  5t|} | j||cdddS#1swYyxYw)a Write a textual summary report to `file`. Each module in `morfs` is listed, with counts of statements, executed statements, missing statements, and a list of lines missed. If `show_missing` is true, then details of which lines or branches are missing will be included in the report. If `ignore_errors` is true, then a failure while reporting a single file will not stop the entire report. `file` is a file-like object, suitable for writing. `output_format` determines the format, either "text" (the default), "markdown", or "total". `include` is a list of file name patterns. Files that match will be included in the report. Files matching `omit` will not be included in the report. If `skip_covered` is true, don't report on files with 100% coverage. If `skip_empty` is true, don't report on empty files (those that have no statements). `contexts` is a list of regular expression strings. Only data from :ref:`dynamic contexts ` that match one of those expressions (using :func:`re.search `) will be included in the report. `precision` is the number of digits to display after the decimal point for percentages. All of the arguments default to the settings read from the :ref:`configuration file `. Returns a float, the total percentage covered. .. versionadded:: 4.0 The `skip_covered` parameter. .. versionadded:: 5.0 The `contexts` and `skip_empty` parameters. .. versionadded:: 5.2 The `precision` parameter. .. versionadded:: 7.0 The `format` parameter. ) ignore_errorsrbrc show_missing skip_coveredreport_contexts skip_emptyrysortr)outfileN)rrKr3report)rrrrfilerrrcontextsrryr output_formatreporters rJrzCoverage.report<skB ((*  '"%%$!    8't,H??5$?7 8 8 8s AAc|jt|||||5t|}|j||dddy#1swYyxYw)azAnnotate a list of modules. Each module in `morfs` is annotated. The source is written to a new file, named with a ",cover" suffix, with each line prefixed with a marker to indicate the coverage of the line. Covered lines have ">", excluded lines have "-", and missing lines have "!". See :meth:`report` for other arguments. )rrbrcr) directoryN)rrKr r)rrrrrrrrs rJannotatezCoverage.annotatesX& ((*  '"$   8(-H OOEYO 7 8 8 8s A  Ac |jt||||||||| | | |  5t|} | j|cdddS#1swYyxYw)aEGenerate an HTML report. The HTML is written to `directory`. The file "index.html" is the overview starting point, with links to more detailed pages for individual modules. `extra_css` is a path to a file of other CSS to apply on the page. It will be copied into the HTML directory. `title` is a text string (not HTML) to use as the title of the HTML report. See :meth:`report` for other arguments. Returns a float, the total percentage covered. .. note:: The HTML report files are generated incrementally based on the source files and coverage results. If you modify the report files, the changes will not be considered. You should be careful about changing the files in the report folder. ) rrbrchtml_dir extra_css html_titlehtml_skip_covered show_contextsrhtml_skip_emptyryN)rrKr$r)rrrrrrrtitlerrrrryrs rJ html_reportzCoverage.html_reportsjN ((*  '"*'$&   *$D)H??5) * * *s AAc |jt|||||||5t|jjt |||j cdddS#1swYyxYw)abGenerate an XML report of coverage results. The report is compatible with Cobertura reports. Each module in `morfs` is included in the report. `outfile` is the path to write the file to, "-" will write to stdout. See :meth:`report` for other arguments. Returns a float, the total percentage covered. )rrbrc xml_outputrrN)rrKr4rDrr@r)rrrrrrrrs rJ xml_reportzCoverage.xml_reportsl, ((*  '"$! b!!7!7T9JESWS`S`a b b bs 5A""A+c |jt||||||||5t|jjt |||j cdddS#1swYyxYw)aGenerate a JSON report of coverage results. Each module in `morfs` is included in the report. `outfile` is the path to write the file to, "-" will write to stdout. `pretty_print` is a boolean, whether to pretty-print the JSON output or not. See :meth:`report` for other arguments. Returns a float, the total percentage covered. .. versionadded:: 5.0 )rrbrc json_outputrjson_pretty_printjson_show_contextsN)rrKr4rDrr&r) rrrrrrr pretty_printrs rJ json_reportzCoverage.json_reportso2 ((*  '"$*,  d!!8!8,t:LeUYUbUbc d d ds 5A##A,c|jt||||||5t|jjt |||j cdddS#1swYyxYw)aGenerate an LCOV report of coverage results. Each module in `morfs` is included in the report. `outfile` is the path to write the file to, "-" will write to stdout. See :meth:`report` for other arguments. .. versionadded:: 6.3 )rrbrc lcov_outputrN)rrKr4rDrr'r)rrrrrrrs rJ lcov_reportzCoverage.lcov_report-si$ ((*  '"$   d!!8!8,t:LeUYUbUbc d d ds 5A!!A*c :ddl}|j|jd)d}d|jfd|jfd|j |j j ndfdtr d tnd fd ||jjfd ||jjfd ||jjfd|jjfd|jjfd|jjfd|jj rt#|jj ndfd|j$|j$j'ndfdt(j*j-ddfdt/j.fdt/j0fdt/j2fdt5t(ddfdt(j6fdt)j8fdt)j:fdt=j>fd t=j@fd!t(jBfd"tEt<jFDcgc] \}}|d#|c}}fd$d%jIt5t(d&dgfd'tJjJjMd(fg}|jN)|jQ|jNjS|Scc}}w)*zAReturn a list of (key, value) pairs showing internal information.rNctg}|D]0}|j}|js|dz }|j|2|S)z7Make an entry for the sys_info from a list of plug-ins.z (disabled))rrr)rentriesrentrys rJ plugin_infoz&Coverage.sys_info..plugin_infoRsGG! &44//]*Eu%  & NrScoverage_versioncoverage_modulerz-none-CTracerzavailable from unavailablezplugins.file_tracerszplugins.configurerszplugins.context_switchersconfigs_attempted configs_readrUconfig_contentsrWr~ platformimplementationbuild gil_enabled_is_gil_enabledcy)NTrCrCrSrJrz#Coverage.sys_info..psrS executable def_encoding fs_encodingrcwdr environmentz = command_line argvrz%Y-%m-%d %H:%M:%S)rz list[Any]return list[str])*coveragerr __version____file__r}rrrxrrrrDconfig_files_attemptedconfig_files_readrU_config_contentsreprrz data_filenamerversionreplacerpython_implementation python_buildr8rgetdefaultencodinggetfilesystemencodingrhrgetcwdrrenvironrdatetimenowrwrr)rcovmodrkvinfos rJrzCoverage.sys_infoJs "    !3!3 4  0 doo6QT__002W_ ` L/,8m \ #[1K1K%L M "K 0I0I$J K (+dmm6U6U*V W $++"D"D E T[[:: ; DKK33 4!6:kk6R6RT[[112X`  8N$**224T\ ] s{{**44 5 **, - x==? @ h++- . IGC):LIK L 3>> * S335 6 C557 8 BIIK BIIK SXX  6RSUS]S]6^_das#aS\_ ` SXXgc6H:&FG H ))--/0AB D; @ == $ KK ..0 1 `sL6)rCoverage | None)&rWzFilePath | DefaultValue | Nonerstr | bool | NonerX bool | NonerrrYrrZrrUzFilePath | boolr\Iterable[str] | Noner]rr^rrstr | Iterable[str] | Nonerrrarrdrrrre str | Nonerrrz$Iterable[Callable[..., None]] | NonerNonerr)rrrrrr<)rrrrrr)NF)rrrrrrrr)rrrr)rrrzTConfigValueOut | None)rrrz!TConfigValueIn | TConfigSectionInrr)rrrr)rIterator[None])r)r%rrr)r)rr*zFrameType | Nonerr)r/rrr)r;)r5rrr)r9rr5rrr)r5rrr)r5rrr)rr )NFF)rRrrSrrTrrr)rr)rgr>rz-tuple[str, list[TLineNo], list[TLineNo], str])rgr>rzrr5)rgr>rzdict[TLineNo, tuple[int, int]])rgr>rr/r)rIterable[TMorf] | Nonerz list[tuple[FileReporter, TMorf]]) NNNNNNNNNNNN)rrrrrrrzIO[str] | Nonerstr | list[str] | Nonerrrrrlist[str] | Nonerrry int | Nonerrrrrfloat)NNNNNN)rrrrrrrrrrrrrr)rrrrrrrrrrrrrrrrrrrrrrryrrr)NNNNNNN)rrrrrrrrrrrrrrrr)NNNNNNNN)rrrrrrrrrrrrrrrrrr)rrrrrrrrrrrrrr)rzIterable[tuple[str, Any]])9r __module__ __qualname____doc__rN__annotations__ classmethodrRDEFAULT_DATAFILErrrrrrrrrrrrrrr contextlibcontextmanagerrrrr,r.r6r;r3r?rBr#rPrVrDrZrmrf functools lru_cacheror|rxrrrrrrrrrrCrSrJrArAbs8"$J#  5E)-#'!"'+'+,0,0+/.2&*26"'"8<'T/1T/'T/! T/  T/  T/T/%T/%T/*T/*T/)T/,T/$T/0T/  !T/"#T/$%T/&6'T/( )T/l+HZ S?4 "*6 3$3@ `D3 &%P    -'"4,$ $(!'F ,0 , (, ,  ,  , \27:    F :Y#a$a 'Y#$<)-I%I *I24)-$(%)#'+*.$(%)"& $$(P8%P8"P8# P8  P8 % P8(P8"P8#P8 P8P8P8"P8 P8h)- $%)'+*.%)8%88# 8 % 8 ( 8#8 8@)- $%)'+*. $ $(%)%)"& $7*%7*7*# 7* % 7* ( 7*7*7*"7*#7*#7* 7*7* 7*v)-"%)'+*.%)"& b% b b# b % b ( b# b  b  bH)-"%)'+*.%)$(%)$d%$d$d# $d % $d ( $d#$d"$d#$d $dP)-"%)'+*.%)d%dd# d % d ( d#d d:5rSCOVERAGE_DEBUG_CALLS)decorate_methods show_callsT) show_argsrD)butnotFr!c8tjd}tjd}| t|z}n||}ny|sttdryt |}|t_d|_d|_d|_ d|_ d|_ |j|S)aCall this at Python start-up to perhaps measure coverage. If the environment variable COVERAGE_PROCESS_START is defined, coverage measurement is started. The value of the variable is the config file to use. For details, see https://coverage.readthedocs.io/en/latest/subprocess.html. Returns the :class:`Coverage` instance that was started, or None if it was not started by this call. COVERAGE_PROCESS_CONFIGCOVERAGE_PROCESS_STARTNr)rUFT) rhgetenvrhasattrprocess_startuprArrnrorprlrtr)r" config_datacpsrUrGs rJr r s))56K )), -C(;6   W_j9 { +C"OC"'C#(C CNCIIK JrSchtjx}r|jtdy)zcoverage.versionr?coverage.xmlreportr@rrKr_DEFAULT_DATAFILErrArr rrr rrrCrSrJr3sY-"    .**.(@Z,=7\\[[&$,,5((:.+.B   %*B  % % *$]}]D)yryy'+,;T"|H &+.b 1rS