aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/models/utils.py
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-04-24 20:14:15 +0200
committerGravatar GitHub <[email protected]>2019-04-24 20:14:15 +0200
commitdd9723705d0b41363c0941b02c4ee5d3b2bafe32 (patch)
treee0bfe8cd82087ed1b9d2dff6249282d13c790a74 /pydis_site/apps/api/models/utils.py
parentMerge pull request #202 from gdude2002/django+200/wiki (diff)
parentAddress review (diff)
Merge pull request #215 from gdude2002/django+192/flake8-docstrings
[#192] Flake8-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(