Skip to content

Commit 033f873

Browse files
committed
Add doctest for Config
1 parent 0067931 commit 033f873

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

bpc_utils/misc.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,16 @@ class Config(MutableMapping[str, object]):
210210
This class is inspired from :class:`argparse.Namespace` for storing
211211
internal attributes and/or configuration variables.
212212
213+
>>> config = Config(foo='var', bar=True)
214+
>>> config.foo
215+
'var'
216+
>>> config['bar']
217+
True
218+
>>> config.bar = 'boo'
219+
>>> del config['foo']
220+
>>> config
221+
Config(bar='boo')
222+
213223
"""
214224

215225
def __init__(self, **kwargs: object) -> None:

0 commit comments

Comments
 (0)