aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-05-10 18:07:17 -0700
committerGravatar MarkKoz <[email protected]>2020-05-11 12:03:11 -0700
commit4248f88a7407b6e9a5d80800a96f8707003634d3 (patch)
tree3afcb9c819280aa693f866cd9300cdda5dce4a42
parentTest `is_maybe_token` returns False for missing parts (diff)
Token remover: fix `is_maybe_token` returning None instead of False
It's annotated as returning a bool and when the split fails it already returns False. To be consistent, it should always return a bool.
-rw-r--r--bot/cogs/token_remover.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/cogs/token_remover.py b/bot/cogs/token_remover.py
index e90d5ab8b..543f4c5a7 100644
--- a/bot/cogs/token_remover.py
+++ b/bot/cogs/token_remover.py
@@ -121,6 +121,8 @@ class TokenRemover(Cog):
if cls.is_valid_user_id(user_id) and cls.is_valid_timestamp(creation_timestamp):
return True
+ return False
+
@staticmethod
def is_valid_user_id(b64_content: str) -> bool:
"""