From 9fe7815c17623ddedd8bfc8d5b281b778a73cc43 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 2 Nov 2018 13:14:42 +0000 Subject: [PATCH] utils.irc.color should take `int` for foreground/background, not str --- src/utils/irc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/irc.py b/src/utils/irc.py index b7819e7c..49e118f4 100644 --- a/src/utils/irc.py +++ b/src/utils/irc.py @@ -98,7 +98,7 @@ FONT_BOLD, FONT_ITALIC, FONT_UNDERLINE, FONT_INVERT = ("\x02", "\x1D", FONT_COLOR, FONT_RESET = "\x03", "\x0F" REGEX_COLOR = re.compile("%s\d\d(?:,\d\d)?" % FONT_COLOR) -def color(s: str, foreground: str, background: str=None) -> str: +def color(s: str, foreground: int, background: int=None) -> str: foreground = str(foreground).zfill(2) if background: background = str(background).zfill(2)