diff options
author | 2020-05-24 10:18:39 +0200 | |
---|---|---|
committer | 2020-05-24 10:18:39 +0200 | |
commit | 3f8dce7502e3afb2d119979cfc455efcde7ad9db (patch) | |
tree | bf3027a0f38eb28d777e98444db61ed665f48cde | |
parent | Merge branch 'master' into redis_persistence (diff) |
use __name__ for type list
Instead of relying on __str__ representation,
we'll use the __name__ dunder.
Co-authored-by: Mark <[email protected]>
-rw-r--r-- | bot/utils/redis_cache.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |