diff options
| author | 2020-08-03 10:25:11 +0200 | |
|---|---|---|
| committer | 2020-08-03 10:25:11 +0200 | |
| commit | 685214c5495e0364a57f50c48a8c83d96bd53054 (patch) | |
| tree | e0c473c2081a06282b549c2cfb81907e087b9e5d /pydis_site/apps/api/models/utils.py | |
| parent | Merge pull request #370 from python-discord/role-reminders (diff) | |
| parent | Delete FilterList objects for tests. (diff) | |
Merge pull request #371 from python-discord/whitelist_system
FilterList model and endpoints
Diffstat (limited to 'pydis_site/apps/api/models/utils.py')
| -rw-r--r-- | pydis_site/apps/api/models/utils.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/pydis_site/apps/api/models/utils.py b/pydis_site/apps/api/models/utils.py deleted file mode 100644 index 0540c4de..00000000 --- a/pydis_site/apps/api/models/utils.py +++ /dev/null @@ -1,17 +0,0 @@ -from operator import itemgetter - - -class ModelReprMixin: - """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( - self.__dict__.items(), - key=itemgetter(0) - ) - if not attribute.startswith('_') - ) - return f'<{self.__class__.__name__}({attributes})>' |