Use `cls` variable to instantiate

This commit is contained in:
Takeshi KOMIYA 2018-03-27 01:29:50 +09:00
parent 13455067e8
commit 2a43b44ec6

View File

@ -183,7 +183,7 @@ class Config(object):
# type: (unicode, unicode, Dict, Tags) -> Config
"""Create a Config object from configuration file."""
namespace = eval_config_file(confdir, filename, tags)
return Config(namespace, overrides or {})
return cls(namespace, overrides or {})
def check_types(self):
# type: () -> None