Fixed a lack of repr causing bugs on inspect

This commit is contained in:
Maximilien Rigaut 2022-06-20 19:37:34 +02:00
parent 219fb51081
commit 2003de924b
No known key found for this signature in database
GPG Key ID: 4F14B23709ADA5B1
1 changed files with 9 additions and 0 deletions

View File

@ -104,3 +104,12 @@ class Environment:
f'\nSecondary parameters:\n{self._sParams}'
f'\nReserved parameters are preceded with an underscore.'
), level='CRITICAL') # Could also add attribute as a new entry
def __repr__(self):
"""
Returns a string representation of the environment.
:return: String representation of the environment.
"""
return f'Environment object with the following parameters:\n' \
f'Mandatory parameters:\n{self._mParams}\n' \
f'Secondary parameters:\n{self._sParams}'