From 3f8dce7502e3afb2d119979cfc455efcde7ad9db Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 24 May 2020 10:18:39 +0200 Subject: use __name__ for type list Instead of relying on __str__ representation, we'll use the __name__ dunder. Co-authored-by: Mark --- bot/utils/redis_cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/utils/redis_cache.py b/bot/utils/redis_cache.py index 1ec1b9fea..fadbca673 100644 --- a/bot/utils/redis_cache.py +++ b/bot/utils/redis_cache.py @@ -89,7 +89,7 @@ class RedisCache: This will be dynamically updated if we change the TYPESTRING_PREFIXES constant up top. """ - valid_types = ", ".join([str(_type).split("'")[1] for _, _type in TYPESTRING_PREFIXES]) + valid_types = ", ".join(str(_type.__name__) for _, _type in TYPESTRING_PREFIXES) valid_types = ", and ".join(valid_types.rsplit(", ", 1)) return valid_types -- cgit v1.2.3