summaryrefslogtreecommitdiff
path: root/config.py
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2022-08-17 23:41:48 -0700
committerScott Gasch <[email protected]>2022-08-17 23:41:48 -0700
commita993e44371ada4ae0c592058bd98f1c61342c04f (patch)
treee616404d0625eee8fd533934fac176b5af3436eb /config.py
parent772038b8d852446b77c9ee857885874f2552e9a6 (diff)
More new config bugs: needs to support a .get() method... doh.
Diffstat (limited to 'config.py')
-rw-r--r--config.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/config.py b/config.py
index a83433c..c883a3b 100644
--- 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.