Skip to content

Commit ff4c493

Browse files
committed
Simplify warning colours
1 parent f6ef701 commit ff4c493

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

Lib/_colorize.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,7 @@ class Timeit(ThemeSection):
331331
arrow: str = ANSIColors.GREY
332332
warning: str = ANSIColors.YELLOW
333333
warning_worst: str = ANSIColors.MAGENTA
334-
warning_worst_timing: str = ANSIColors.BOLD_MAGENTA
335334
warning_best: str = ANSIColors.GREEN
336-
warning_best_timing: str = ANSIColors.BOLD_GREEN
337335
reset: str = ANSIColors.RESET
338336

339337

Lib/timeit.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -387,15 +387,10 @@ def format_time(dt):
387387
print(file=sys.stderr)
388388
warnings.warn_explicit(
389389
f"{theme.warning}The test results are likely unreliable. "
390-
f"The {theme.warning_worst}worst time ("
391-
f"{theme.warning_worst_timing}{format_time(worst)}{reset}"
392-
f"{theme.warning_worst})"
393-
f"{theme.warning} was more than "
394-
f"{theme.warning_worst}four times slower"
395-
f"{theme.warning} than the "
396-
f"{theme.warning_best}best time ("
397-
f"{theme.warning_best_timing}{format_time(best)}{reset}"
398-
f"{theme.warning_best}){theme.warning}.{reset}",
390+
f"The {theme.warning_worst}worst time ({format_time(worst)})"
391+
f"{theme.warning} was more than four times slower than the "
392+
f"{theme.warning_best}best time ({format_time(best)})"
393+
f"{theme.warning}.{reset}",
399394
UserWarning, "", 0,
400395
)
401396
return None

0 commit comments

Comments
 (0)