diff --git a/src/agentscope/models/__init__.py b/src/agentscope/models/__init__.py index 26f6c0882..66bd69b44 100644 --- a/src/agentscope/models/__init__.py +++ b/src/agentscope/models/__init__.py @@ -130,7 +130,7 @@ def read_model_configs( for cfg in format_configs: if cfg.config_name in _MODEL_CONFIGS: raise ValueError( - f"config_name [{cfg.config_name}] already exists." + f"config_name [{cfg.config_name}] already exists.", ) _MODEL_CONFIGS[cfg.config_name] = cfg diff --git a/tests/model_test.py b/tests/model_test.py index bea2f3434..4c247daec 100644 --- a/tests/model_test.py +++ b/tests/model_test.py @@ -72,7 +72,9 @@ def test_load_model_configs(self) -> None: model = load_model_by_config_name("my_post_api") self.assertEqual(model.config_name, "my_post_api") self.assertRaises( - ValueError, load_model_by_config_name, "non_existent_id" + ValueError, + load_model_by_config_name, + "non_existent_id", ) # load a single config @@ -95,5 +97,7 @@ def test_load_model_configs(self) -> None: self.assertEqual(response.text, "test_model_wrapper") clear_model_configs() self.assertRaises( - ValueError, load_model_by_config_name, "test_model_wrapper" + ValueError, + load_model_by_config_name, + "test_model_wrapper", )