11"""Cascading configuration from the CLI and config files."""
22
3- __version__ = "0.3.0 "
3+ __version__ = "0.3.1 "
44
55import json
66import os
@@ -55,22 +55,25 @@ def _update_dict_recursively(self, original: Dict, updater: Dict) -> Dict:
5555 """Update dictionary recursively."""
5656 for k , v in updater .items ():
5757 if isinstance (v , dict ):
58- if not v : # v is not None, v is empty dictionary
58+ if not v : # v is not None, v is empty dictionary
5959 original [k ] = dict ()
6060 else :
6161 original [k ] = self ._update_dict_recursively (original .get (k , {}), v )
6262 elif isinstance (v , bool ):
6363 original [k ] = v # v is True or False
6464 elif v or k not in original : # v is not None, or key does not exist yet
6565 original [k ] = v
66- elif self .none_overrides_value : # v is None, but can override previous value
66+ elif (
67+ self .none_overrides_value
68+ ): # v is None, but can override previous value
6769 original [k ] = v
6870 return original
6971
7072 def add_dict (self , * args , ** kwargs ):
7173 """
7274 Add dictionary configuration source to source list.
73- *args and **kwargs are passed to :class:`cascade_config.DictConfigSource()`.
75+
76+ ``*args`` and ``**kwargs`` are passed to :class:`cascade_config.DictConfigSource()`.
7477
7578 """
7679 source = DictConfigSource (* args , ** kwargs )
@@ -79,7 +82,9 @@ def add_dict(self, *args, **kwargs):
7982 def add_argumentparser (self , * args , ** kwargs ):
8083 """
8184 Add argumentparser configuration source to source list.
82- *args and **kwargs are passed to :class:`cascade_config.ArgumentParserConfigSource()`.
85+
86+ ``*args`` and ``**kwargs`` are passed to
87+ :class:`cascade_config.ArgumentParserConfigSource()`.
8388
8489 """
8590 source = ArgumentParserConfigSource (* args , ** kwargs )
@@ -88,15 +93,19 @@ def add_argumentparser(self, *args, **kwargs):
8893 def add_namespace (self , * args , ** kwargs ):
8994 """
9095 Add argparse Namespace configuration source to source list.
91- *args and **kwargs are passed to :class:`cascade_config.NamespaceConfigSource()`.
96+
97+ ``*args`` and ``**kwargs`` are passed to
98+ :class:`cascade_config.NamespaceConfigSource()`.
9299 """
93100 source = NamespaceConfigSource (* args , ** kwargs )
94101 self .sources .append (source )
95102
96103 def add_json (self , * args , ** kwargs ):
97104 """
98105 Add JSON configuration source to source list.
99- *args and **kwargs are passed to :class:`cascade_config.JSONConfigSource()`.
106+
107+ ``*args`` and ``**kwargs`` are passed to
108+ :class:`cascade_config.JSONConfigSource()`.
100109 """
101110 source = JSONConfigSource (* args , ** kwargs )
102111 self .sources .append (source )
0 commit comments