aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2020-05-26 18:55:12 +0200
committerGravatar Leon Sandøy <[email protected]>2020-05-26 19:07:14 +0200
commit46a377deef15545d1b860e283d8d0f8291298cee (patch)
tree1c7e35e6d3601cefd277a26a82bc493bcbaafdff
parentMake self.increment_lock private. (diff)
Improve some docstrings for RedisCache.
Thanks @MarkKoz!
-rw-r--r--bot/utils/redis_cache.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/bot/utils/redis_cache.py b/bot/utils/redis_cache.py
index 89af225e2..a1196fcb5 100644
--- a/bot/utils/redis_cache.py
+++ b/bot/utils/redis_cache.py
@@ -134,8 +134,7 @@ class RedisCache:
"Critical error: RedisCache has no `Bot` instance. "
"This happens when the class RedisCache was created in doesn't "
"have a Bot instance. Please make sure that you're instantiating "
- "the RedisCache inside a class that has a Bot instance "
- "class attribute."
+ "the RedisCache inside a class that has a Bot instance attribute."
)
log.error(error_message)
raise RuntimeError(error_message)
@@ -143,7 +142,7 @@ class RedisCache:
if self._namespace is None:
error_message = (
"Critical error: RedisCache has no namespace. "
- "Did you initialize this object as a class attribute?"
+ "This object must be initialized as a class attribute."
)
log.error(error_message)
raise RuntimeError(error_message)
@@ -201,8 +200,7 @@ class RedisCache:
"Critical error: RedisCache has no `Bot` instance. "
"This happens when the class RedisCache was created in doesn't "
"have a Bot instance. Please make sure that you're instantiating "
- "the RedisCache inside a class that has a Bot instance "
- "class attribute."
+ "the RedisCache inside a class that has a Bot instance attribute."
)
log.error(error_message)
raise RuntimeError(error_message)