diff --git a/setup.cfg b/setup.cfg index 9a81295..d49515b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -45,7 +45,7 @@ tests_require = lint_requires = importlib-metadata>=3.10.1 - importlib-resources>=5.4.0 + importlib-resources==5.4.0 pre-commit>=2.0.1 black>=22.1.0 pyright>=0.0.13 diff --git a/src/cobbler_tftp/settings/__init__.py b/src/cobbler_tftp/settings/__init__.py index a68e3d9..c96cbbc 100644 --- a/src/cobbler_tftp/settings/__init__.py +++ b/src/cobbler_tftp/settings/__init__.py @@ -169,7 +169,7 @@ def load_config_file(self, config_path: Union[Path, None]) -> SettingsDict: config_file_content = ( files("cobbler_tftp.settings.data") .joinpath("settings.yml") - .read_text(encoding="UTF-8") + .read_text(encoding="UTF-8") # type: ignore ) self._settings_dict = yaml.safe_load(config_file_content) except yaml.YAMLError: @@ -177,7 +177,7 @@ def load_config_file(self, config_path: Union[Path, None]) -> SettingsDict: elif config_path and Path.exists(config_path): try: config_file_content = ( - files(config_import_path).joinpath(config_file).read_text("utf-8") + files(config_import_path).joinpath(config_file).read_text("utf-8") # type: ignore ) self._settings_dict = yaml.safe_load(config_file_content) except yaml.YAMLError: