Skip to content
Snippets Groups Projects
Verified Commit 11ebcc50 authored by Bruce Cowan's avatar Bruce Cowan :airplane:
Browse files

Fixed type annotations

parent 1b9f5085
No related branches found
No related tags found
No related merge requests found
Pipeline #3172 passed
......@@ -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"]:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment