projects
/
python_utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
772038b
)
More new config bugs: needs to support a .get() method... doh.
author
Scott Gasch
<
[email protected]
>
Thu, 18 Aug 2022 06:41:48 +0000
(23:41 -0700)
committer
Scott Gasch
<
[email protected]
>
Thu, 18 Aug 2022 06:41:48 +0000
(23:41 -0700)
config.py
patch
|
blob
|
history
diff --git
a/config.py
b/config.py
index a83433c68733178b634dad288cc4c14428a6b81b..c883a3b7fd3ff106c97139db096448fce9b457a1 100644
(file)
--- a/
config.py
+++ b/
config.py
@@
-234,6
+234,9
@@
class Config:
def __contains__(self, key: str) -> bool:
return key in self.config
+ def get(self, key: str, default: Any = None) -> Optional[Any]:
+ return self.config.get(key, default)
+
@staticmethod
def add_commandline_args(title: str, description: str = "") -> argparse._ArgumentGroup:
"""Create a new context for arguments and return a handle.