Skip to content

Commit bb3382f

Browse files
committed
build: no need for the combine/html times now
1 parent 9ea349a commit bb3382f

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

igor.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
99
"""
1010

11-
import contextlib
1211
import datetime
1312
import glob
1413
import inspect
@@ -22,7 +21,6 @@
2221
import sys
2322
import sysconfig
2423
import textwrap
25-
import time
2624
import types
2725
import zipfile
2826

@@ -47,16 +45,6 @@
4745
# by "python igor.py blah".
4846

4947

50-
@contextlib.contextmanager
51-
def time_message(msg: str):
52-
"""Print a message about how long something took."""
53-
start = time.monotonic()
54-
try:
55-
yield
56-
finally:
57-
print(f"Time for {msg}: {time.monotonic() - start:.2f}s")
58-
59-
6048
def do_show_env():
6149
"""Show the environment variables."""
6250
print("Environment:")
@@ -243,8 +231,7 @@ def do_combine_html():
243231
os.environ["COVERAGE_HOME"] = os.getcwd()
244232
cov = coverage.Coverage(config_file="metacov.ini")
245233
cov.load()
246-
with time_message("combine"):
247-
cov.combine()
234+
cov.combine()
248235
cov.save()
249236
# A new Coverage to turn on messages. Better would be to have tighter
250237
# control over message verbosity...
@@ -253,8 +240,7 @@ def do_combine_html():
253240
show_contexts = bool(
254241
os.getenv("COVERAGE_DYNCTX") or os.getenv("COVERAGE_CONTEXT"),
255242
)
256-
with time_message("html"):
257-
total = cov.html_report(show_contexts=show_contexts)
243+
total = cov.html_report(show_contexts=show_contexts)
258244
print(f"Total: {total:.3f}%")
259245

260246

0 commit comments

Comments
 (0)