Begin documentation and annotation backfill

This commit is contained in:
Adam Hopkins
2021-01-18 13:21:37 +02:00
parent 7028eae083
commit 2f48e81e0b
37 changed files with 268 additions and 3820 deletions

View File

@@ -101,11 +101,13 @@ class Config(dict):
def update_config(self, config: Union[bytes, str, dict, Any]):
"""Update app.config.
Note:: only upper case settings are considered.
..note:: only upper case settings are considered.
You can upload app config by providing path to py file
holding settings.
..code-block::
# /some/py/file
A = 1
B = 2
@@ -118,12 +120,16 @@ class Config(dict):
You can upload app config by providing dict holding settings.
..code-block::
d = {"A": 1, "B": 2}
config.update_config(d)
You can upload app config by providing any object holding settings,
but in such case config.__dict__ will be used as dict holding settings.
..code-block::
class C:
A = 1
B = 2