diff --git a/konfik/__init__.py b/konfik/__init__.py index bf33603..81a2fd2 100644 --- a/konfik/__init__.py +++ b/konfik/__init__.py @@ -174,7 +174,9 @@ def _load_config(self): return self._load_yaml(config_path) else: - raise NotImplementedError(f"Config type '{self._config_ext}' is not supported.") + raise NotImplementedError( + f"Config type '{self._config_ext}' is not supported." + ) @staticmethod def _load_env(config_path): @@ -183,7 +185,9 @@ def _load_env(config_path): try: # Instead of using `load_dotenv()``, this is done to avoid recursively searching for dotenv file. # There is no element of surprise. If the file is not found in the explicit path, this will raise an error! - dotenv_file = find_dotenv(filename=config_path, raise_error_if_not_found=True, usecwd=True) + dotenv_file = find_dotenv( + filename=config_path, raise_error_if_not_found=True, usecwd=True + ) if dotenv_file: config = dotenv_values(dotenv_file) @@ -229,7 +233,9 @@ def get_by_path(dct, key_list): try: return reduce(operator.getitem, key_list, dct) except KeyError as e: - raise MissingVariableError(f"No such variable '{e.args[0]}' exists.") from None + raise MissingVariableError( + f"No such variable '{e.args[0]}' exists." + ) from None class KonfikCLI: @@ -237,7 +243,9 @@ class KonfikCLI: def build_parser(self): parser = argparse.ArgumentParser( - description=colorize.colorize_title("\nKonfik -- The strangely familiar config parser ⚙️\n") + description=colorize.colorize_title( + "\nKonfik -- The strangely familiar config parser ⚙️\n" + ) ) # Add arguments. diff --git a/tests/test_konfik.py b/tests/test_konfik.py index 85392e2..5247d55 100644 --- a/tests/test_konfik.py +++ b/tests/test_konfik.py @@ -6,8 +6,8 @@ Konfik, MissingConfigError, MissingVariableError, - cli_entrypoint, __version__, + cli_entrypoint, )