xenserver / status-report

Program that gathers data for xenserver host diagnostics
GNU Lesser General Public License v2.1
1 stars 9 forks source link

StringIOmtime: move it to define it before using it #81

Closed bernhardkaindl closed 6 months ago

bernhardkaindl commented 7 months ago

StringIOmtime is used by many functions:

Currently it is located at the end of the file just above main(). This is not the correct place for it.

Move it up to the utiltiy fuctions to define it before using it

Rationale: Moving the function fixed warnings on the function not behind defined before use in VSCode.

Also, and more importantly, moving it is consistent with the general function order where the low-level functions and classes like this one are first and then the "business" logic that uses these low-level functions.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (5ade7b7) 86.96% compared to head (9829f32) 86.96%. Report is 8 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #81 +/- ## ======================================= Coverage 86.96% 86.96% ======================================= Files 17 17 Lines 2141 2141 ======================================= Hits 1862 1862 Misses 279 279 ``` | [Flag](https://app.codecov.io/gh/xenserver/status-report/pull/81/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xenserver) | Coverage Δ | | |---|---|---| | [python2.7](https://app.codecov.io/gh/xenserver/status-report/pull/81/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xenserver) | `85.64% <100.00%> (+0.04%)` | :arrow_up: | | [python3.10.13](https://app.codecov.io/gh/xenserver/status-report/pull/81/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xenserver) | `86.30% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xenserver#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

coveralls commented 7 months ago

Pull Request Test Coverage Report for Build 7931611374

Details


Files with Coverage Reduction New Missed Lines %
xen-bugtool 3 87.8%
<!-- Total: 3 -->
Totals Coverage Status
Change from base Build 7930039432: -0.1%
Covered Lines: 1933
Relevant Lines: 2158

💛 - Coveralls