Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions summoner/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1224,11 +1224,21 @@ def run(
self,
host: str = '127.0.0.1',
port: int = 8888,
config_path: Optional[str] = None
config_path: Optional[str] = None,
config_dict: Optional[dict[str, Any]] = None,
):
try:
# Load config parameters
client_config = load_config(config_path=config_path, debug=True)

if config_dict is None:
# Load config parameters
client_config = load_config(config_path=config_path, debug=True)
elif isinstance(config_dict, dict):
# Shallow copy to avoid external mutation
client_config = dict(config_dict)
else:
raise TypeError(f"SummonerClient.run: config_dict must be a dict or None, got {type(config_dict).__name__}")

# client_config = load_config(config_path=config_path, debug=True)
self._apply_config(client_config)

# Compile Regex information to parse the flow
Expand Down
1 change: 1 addition & 0 deletions summoner/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def run(
):

if config_dict is None:
# Load config parameters
server_config = load_config(config_path=config_path, debug=True)
elif isinstance(config_dict, dict):
# Shallow copy to avoid external mutation
Expand Down