We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 612ee8b commit 138d627Copy full SHA for 138d627
1 file changed
dev_tools/qualtran_dev_tools/shell_tools.py
@@ -34,7 +34,7 @@ def highlight(text: str, color_code: int, bold: bool = False) -> str:
34
Returns:
35
The highlighted string.
36
"""
37
- return f"{'\\x1b[1m' if bold else ''}\x1b[{color_code}m{text}\x1b[0m"
+ return "{}\033[{}m{}\033[0m".format("\033[1m" if bold else "", color_code, text)
38
39
40
def abbreviate_command_arguments_after_switches(cmd: tuple[str, ...]) -> tuple[str, ...]:
0 commit comments