Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion did/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def check(self) -> None:
try:
f.result()
except did.base.ReportError as error:
log.error("Skipping %s due to %s", f, error)
log.error("%s", error)
sys.stdout.flush()
sys.stderr.flush()

Expand Down
2 changes: 1 addition & 1 deletion did/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def color(
light_code = (1 if light else 0)
# Starting and finishing sequence
start = f"\033[{light_code}{text_color_code}{background_code}m"
finish = "\033[1;m"
finish = "\033[0m"
return "".join([start, text, finish])


Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def test_color_function_exists() -> None:
# No color sets
res = did.utils.color(
"text", text_color=None, background=None, light=False, enabled=True)
assert res == "\033[0mtext\033[1;m"
assert res == "\033[0mtext\033[0m"
# Disabled
res = did.utils.color(
"text", text_color=None, background=None, light=False, enabled=False)
Expand All @@ -256,11 +256,11 @@ def test_color_function_exists() -> None:
# Known color
res = did.utils.color(
"text", text_color="red", background=None, light=False, enabled=True)
assert res == "\033[0;31mtext\033[1;m"
assert res == "\033[0;31mtext\033[0m"
# Light version
res = did.utils.color(
"text", text_color="red", background=None, light=True, enabled=True)
assert res == "\033[1;31mtext\033[1;m"
assert res == "\033[1;31mtext\033[0m"

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# strtobool
Expand Down
Loading