summaryrefslogtreecommitdiff
path: root/poezio/config.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2018-08-15 14:21:59 +0200
committermathieui <mathieui@mathieui.net>2018-08-15 14:23:00 +0200
commit5ea82ac0af1cb855c9333796004c6a97da6b5ad4 (patch)
treef737e7e25012b76324ae03b591e19266a113a845 /poezio/config.py
parentcccb1d97591966de1bab1b293294eefb17b90aac (diff)
downloadpoezio-5ea82ac0af1cb855c9333796004c6a97da6b5ad4.tar.gz
poezio-5ea82ac0af1cb855c9333796004c6a97da6b5ad4.tar.bz2
poezio-5ea82ac0af1cb855c9333796004c6a97da6b5ad4.tar.xz
poezio-5ea82ac0af1cb855c9333796004c6a97da6b5ad4.zip
Fix mypy errors, add type annotations
Diffstat (limited to 'poezio/config.py')
-rw-r--r--poezio/config.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/poezio/config.py b/poezio/config.py
index 944557a6..8223e5c0 100644
--- a/poezio/config.py
+++ b/poezio/config.py
@@ -165,7 +165,7 @@ class Config(RawConfigParser):
def __init__(self, file_name: Path, default=None) -> None:
RawConfigParser.__init__(self, None)
# make the options case sensitive
- self.optionxform = str
+ self.optionxform = lambda param: str(param)
self.file_name = file_name
self.read_file()
self.default = default
@@ -205,7 +205,7 @@ class Config(RawConfigParser):
else:
res = self.getstr(option, section)
except (NoOptionError, NoSectionError, ValueError, AttributeError):
- return default
+ return default or ''
if res is None:
return default