From b173e4c08db60f53950655c60b680ab5278994da Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 19 Mar 2024 13:11:33 +1100 Subject: [PATCH] tidy(config): type checker ignores + comment --- invokeai/app/services/config/config_default.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/invokeai/app/services/config/config_default.py b/invokeai/app/services/config/config_default.py index 9927aa3c0d..3f33357cff 100644 --- a/invokeai/app/services/config/config_default.py +++ b/invokeai/app/services/config/config_default.py @@ -395,7 +395,8 @@ def load_and_migrate_config(config_path: Path) -> InvokeAIAppConfig: # This is a v3 config file, attempt to migrate it shutil.copy(config_path, config_path.with_suffix(".yaml.bak")) try: - config = migrate_v3_config_dict(loaded_config_dict) + # This could be the wrong shape, but we will catch all exceptions below + config = migrate_v3_config_dict(loaded_config_dict) # pyright: ignore [reportUnknownArgumentType] except Exception as e: shutil.copy(config_path.with_suffix(".yaml.bak"), config_path) raise RuntimeError(f"Failed to load and migrate v3 config file {config_path}: {e}") from e