some docs for future users :-)

This commit is contained in:
Matthias 2022-04-05 00:15:22 +02:00
parent 205916e0b2
commit 23f57bec19
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -108,6 +108,15 @@ class GenericSettingClassMixin:
REFERENCE_NAME = None
def _get_reference(self):
"""
Returns dict that can be used as an argument for kwargs calls.
Helps to make overriden calls generic for simple reuse.
Usage:
```python
some_random_function(argument0, kwarg1=value1, **self._get_reference())
```
"""
return {
self.REFERENCE_NAME: getattr(self, self.REFERENCE_NAME)
}