From 11ebcc50461e339b967c99de5f50f095d634a770 Mon Sep 17 00:00:00 2001 From: Bruce Cowan <bruce@bcowan.me.uk> Date: Thu, 13 Jan 2022 19:31:40 +0000 Subject: [PATCH] Fixed type annotations --- karma.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/karma.py b/karma.py index 75842eb..68eb77a 100644 --- a/karma.py +++ b/karma.py @@ -49,7 +49,7 @@ class Karma(errbot.BotPlugin): return self._change_karma(match.group(1), -1) @errbot.botcmd - def karma(self, message: errbot.Message, args: str | None) -> str: + def karma(self, message: errbot.Message, args: str) -> str: """Gets karma""" if not args: return "**Usage**: !karma <target>" @@ -57,7 +57,7 @@ class Karma(errbot.BotPlugin): return f"Karma for '{args}' is {self['karma'][args]}" @errbot.botcmd - def karma_top(self, message: errbot.Message, args: str | None) -> str: + def karma_top(self, message: errbot.Message, args: str) -> str: """Gets the top n items""" if len(self["karma"]) == 0: return "There are no items with karma" @@ -71,7 +71,7 @@ class Karma(errbot.BotPlugin): return ", ".join([f"{k}: {v}" for k, v in top]) @errbot.botcmd - def karma_bottom(self, message: errbot.Message, args: str | None) -> str: + def karma_bottom(self, message: errbot.Message, args: str) -> str: """Gets the bottom n items""" if len(self["karma"]) == 0: return "There are no items with karma" @@ -85,7 +85,7 @@ class Karma(errbot.BotPlugin): return ", ".join([f"{k}: {v}" for k, v in bottom]) @errbot.botcmd - def karma_reset(self, message: errbot.Message, args: str | None) -> str: + def karma_reset(self, message: errbot.Message, args: str) -> str: args = args.strip() if args not in self["karma"]: -- GitLab