environment.py : rtype and function doc (part)
This commit is contained in:
parent
6cd7f8047a
commit
df2e0941c8
|
|
@ -26,6 +26,10 @@ class Environment:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
"""
|
||||||
|
Initialises the environment, all parameters are set to None.
|
||||||
|
Set _wasInitialised to False for all parameters.
|
||||||
|
"""
|
||||||
# mandatoryParameters
|
# mandatoryParameters
|
||||||
self._mParams = {
|
self._mParams = {
|
||||||
'config': None,
|
'config': None,
|
||||||
|
|
@ -60,8 +64,10 @@ class Environment:
|
||||||
|
|
||||||
def __getattr__(self, attribute):
|
def __getattr__(self, attribute):
|
||||||
"""
|
"""
|
||||||
Getter for all parameters.
|
Getter for all parameters, looks for super if the parameter is prefaced with an underscore.
|
||||||
|
Looks for mandatory parameters first, then secondary parameters.
|
||||||
:param attribute: The name of the parameter to get.
|
:param attribute: The name of the parameter to get.
|
||||||
|
:type attribute: str
|
||||||
:return: The value of the parameter.
|
:return: The value of the parameter.
|
||||||
"""
|
"""
|
||||||
if attribute[0] == "_":
|
if attribute[0] == "_":
|
||||||
|
|
@ -80,8 +86,9 @@ class Environment:
|
||||||
|
|
||||||
def __setattr__(self, attribute, value):
|
def __setattr__(self, attribute, value):
|
||||||
"""
|
"""
|
||||||
Setter for all parameters.
|
Setter for all parameters, looks for super if the parameter is prefaced with an underscore.
|
||||||
:param attribute: The name of the parameter to set.
|
:param attribute: The name of the parameter to set.
|
||||||
|
:type attribute: str
|
||||||
"""
|
"""
|
||||||
if attribute[0] == "_":
|
if attribute[0] == "_":
|
||||||
super().__setattr__(attribute, value)
|
super().__setattr__(attribute, value)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue