aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/models/utils.py
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2019-04-21 22:28:57 +0100
committerGravatar Gareth Coles <[email protected]>2019-04-21 22:28:57 +0100
commit1142588abda79d1b3c5a94449cf8074964df9228 (patch)
treeb499b79f0961fa15ceb8bced00559b223d5047b3 /pydis_site/apps/api/models/utils.py
parentFinish linting non-API modules (diff)
A whole bunch of docstrings.
Diffstat (limited to 'pydis_site/apps/api/models/utils.py')
-rw-r--r--pydis_site/apps/api/models/utils.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/pydis_site/apps/api/models/utils.py b/pydis_site/apps/api/models/utils.py
index 731486e7..8f590392 100644
--- a/pydis_site/apps/api/models/utils.py
+++ b/pydis_site/apps/api/models/utils.py
@@ -2,13 +2,11 @@ from operator import itemgetter
class ModelReprMixin:
- """
- Adds a `__repr__` method to the model subclassing this
- mixin which will display the model's class name along
- with all parameters used to construct the object.
- """
+ """Mixin providing a `__repr__()` to display model class name and initialisation parameters."""
def __repr__(self):
+ """Returns the current model class name and initialisation parameters."""
+
attributes = ' '.join(
f'{attribute}={value!r}'
for attribute, value in sorted(