Skip to content

Commit 9216be4

Browse files
committed
feat: more flexible way to handle the default runtime and region
1 parent d61e1d1 commit 9216be4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

wherobots/db/driver.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def connect(
3333
host: str = DEFAULT_ENDPOINT,
3434
token: str = None,
3535
api_key: str = None,
36-
runtime: Runtime = DEFAULT_RUNTIME,
37-
region: Region = DEFAULT_REGION,
36+
runtime: Runtime = None,
37+
region: Region = None,
3838
wait_timeout_seconds: int = DEFAULT_SESSION_WAIT_TIMEOUT_SECONDS,
3939
) -> Connection:
4040
if not token and not api_key:
@@ -48,6 +48,9 @@ def connect(
4848
elif api_key:
4949
headers["X-API-Key"] = api_key
5050

51+
runtime = runtime or DEFAULT_RUNTIME
52+
region = region or DEFAULT_REGION
53+
5154
logging.info(
5255
"Requesting %s/%s runtime in %s from %s ...",
5356
runtime.name,

0 commit comments

Comments
 (0)