Skip to content

Commit 28040c3

Browse files
chore: remove ANSI color codes from warning messages (#1498)
* chore: remove ANSI color codes from warning messages * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent de46d2f commit 28040c3

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

bigframes/exceptions.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,6 @@ class ObsoleteVersionWarning(Warning):
9595
"""The BigFrames version is too old."""
9696

9797

98-
class ColorFormatter:
99-
WARNING = "\033[93m"
100-
ENDC = "\033[0m"
101-
102-
10398
def format_message(message: str, fill: bool = True):
10499
"""Formats a warning message with ANSI color codes for the warning color.
105100
@@ -110,10 +105,9 @@ def format_message(message: str, fill: bool = True):
110105
especially if the message already contains newlines.
111106
112107
Returns:
113-
The formatted message string, with ANSI color codes for warning color
114-
if color is supported, otherwise the original message. If `fill` is
115-
True, the message will be wrapped to fit the terminal width.
108+
The formatted message string. If `fill` is True, the message will be wrapped
109+
to fit the terminal width.
116110
"""
117111
if fill:
118112
message = textwrap.fill(message)
119-
return ColorFormatter.WARNING + message + ColorFormatter.ENDC
113+
return message

0 commit comments

Comments
 (0)