Skip to content

Commit 643586a

Browse files
fix linting errors
1 parent dcaa1f9 commit 643586a

2 files changed

Lines changed: 5 additions & 16 deletions

File tree

src/datacustomcode/llm_gateway_config.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ def to_object(self) -> _E:
4141

4242

4343
class LLMGatewayConfig(BaseConfig):
44-
llm_gateway_config: Union[
45-
LLMGatewayObjectConfig[LLMGateway], None
46-
] = None
44+
llm_gateway_config: Union[LLMGatewayObjectConfig[LLMGateway], None] = None
4745

4846
def update(self, other: "LLMGatewayConfig") -> "LLMGatewayConfig":
4947
def merge(

tests/test_llm_gateway_config_update.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@
1919
import yaml
2020

2121
from datacustomcode.llm_gateway.default import DefaultLLMGateway
22-
from datacustomcode.llm_gateway_config import (
23-
LLMGatewayConfig,
24-
LLMGatewayObjectConfig,
25-
)
22+
from datacustomcode.llm_gateway_config import LLMGatewayConfig, LLMGatewayObjectConfig
2623

2724

2825
class TestLLMGatewayConfigUpdate:
@@ -61,18 +58,14 @@ def test_update_respects_force_flag(self):
6158

6259
config1.update(config2)
6360

64-
assert (
65-
config1.llm_gateway_config.type_config_name == "ForcedImplementation"
66-
)
61+
assert config1.llm_gateway_config.type_config_name == "ForcedImplementation"
6762
assert config1.llm_gateway_config.options == {"forced": True}
6863
assert config1.llm_gateway_config.force is True
6964

7065

7166
class TestLLMGatewayConfigLoad:
7267
def test_load_from_yaml_file(self):
73-
config_data = {
74-
"llm_gateway_config": {"type_config_name": "DefaultLLMGateway"}
75-
}
68+
config_data = {"llm_gateway_config": {"type_config_name": "DefaultLLMGateway"}}
7669

7770
with tempfile.NamedTemporaryFile(mode="w", suffix=".yaml", delete=False) as f:
7871
yaml.dump(config_data, f)
@@ -83,9 +76,7 @@ def test_load_from_yaml_file(self):
8376
config.load(temp_file)
8477

8578
assert config.llm_gateway_config is not None
86-
assert (
87-
config.llm_gateway_config.type_config_name == "DefaultLLMGateway"
88-
)
79+
assert config.llm_gateway_config.type_config_name == "DefaultLLMGateway"
8980
llm_gateway = config.llm_gateway_config.to_object()
9081
assert llm_gateway is not None
9182
assert isinstance(llm_gateway, DefaultLLMGateway)

0 commit comments

Comments
 (0)