Flake8/pylint found a few things
@@ -4,7 +4,7 @@ import yaml
class Configuration(dict):
def __init__(self, **kwargs):
- self.update(kwargs)
+ super().__init__(kwargs)
for required_arg in ["custom_order", "explicit_checks", "exclude_checks"]:
if required_arg not in self:
self[required_arg] = None
@@ -13,11 +13,11 @@ class Configuration(dict):
def from_config_file(cls, filename):
try:
config = toml.load(filename)
- except toml.TomlDecodeError as e:
+ except toml.TomlDecodeError:
# Try yaml
config = yaml.safe_load(open(filename))
if not isinstance(config, dict):
- raise Exception(f"Can't understand config file {imported}.")
+ raise Exception(f"Can't understand config file {filename}.")
return cls(**config)
def maybe_override(self, other):
