fix src/Config.py type hinting

This commit is contained in:
jesopo 2019-12-07 10:50:50 +00:00
parent 7274d1bf28
commit fc069d6da2

View file

@ -1,12 +1,13 @@
import collections, configparser, os, typing import collections, configparser, os, typing
class Config(object): class Config(object):
def __init__(self, location: str): def __init__(self, location: str):
self.location = location self.location = location
self._config = collections.OrderedDict() self._config: typing.Dict[str, str] = collections.OrderedDict()
def _parser(self) -> configparser.ConfigParser: def _parser(self) -> configparser.ConfigParser:
return configparser.ConfigParser(dict_type=collections.OrderedDict) return configparser.ConfigParser()
def load(self): def load(self):
if os.path.isfile(self.location): if os.path.isfile(self.location):