diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2020-12-12 18:44:37 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2020-12-12 19:36:18 +0100 |
commit | 65b8046fe08a19df937068e5fe5ad15f9b0a785a (patch) | |
tree | 827e17a99d39c5db453d0fc0e9b46249292aa4e3 /poezio/config.py | |
parent | 34ec9e3ee1384506b2e803bdfe94201a7b7ff4c3 (diff) | |
download | poezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.tar.gz poezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.tar.bz2 poezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.tar.xz poezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.zip |
from __future__ import annotations
Now that our baseline is Python 3.7, we can rely on type annotations to
be lazily evaluated.
Diffstat (limited to 'poezio/config.py')
-rw-r--r-- | poezio/config.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/poezio/config.py b/poezio/config.py index 9a51e53f..78581775 100644 --- a/poezio/config.py +++ b/poezio/config.py @@ -383,8 +383,7 @@ class Config(RawConfigParser): if file_ok(self.file_name): try: with self.file_name.open('r', encoding='utf-8') as df: - lines_before = [line.strip() - for line in df] # type: List[str] + lines_before: List[str] = [line.strip() for line in df] except OSError: log.error( 'Unable to read the config file %s', @@ -394,7 +393,7 @@ class Config(RawConfigParser): else: lines_before = [] - sections = {} # type: Dict[str, List[int]] + sections: Dict[str, List[int]] = {} duplicate_section = False current_section = '' current_line = 0 |