chore: address coderabbit cleanup notes
This commit is contained in:
@@ -161,8 +161,8 @@ def _read_json_arg(
|
||||
if file_path:
|
||||
try:
|
||||
value = json.loads(Path(file_path).read_text(encoding="utf-8"))
|
||||
except FileNotFoundError:
|
||||
raise typer.BadParameter(f"file not found: {file_path}")
|
||||
except FileNotFoundError as exc:
|
||||
raise typer.BadParameter(f"file not found: {file_path}") from exc
|
||||
except json.JSONDecodeError as exc:
|
||||
raise typer.BadParameter(f"invalid JSON in file: {exc}") from exc
|
||||
return _require_json_object(value, flag_names)
|
||||
|
||||
@@ -258,7 +258,7 @@ def _rpc_timeout_from_optional_config(
|
||||
return override
|
||||
try:
|
||||
config = load_workflow_config(path)
|
||||
except FileNotFoundError, json.JSONDecodeError, ValidationError:
|
||||
except (FileNotFoundError, json.JSONDecodeError, ValidationError):
|
||||
return 30.0
|
||||
target = config.client.target
|
||||
if isinstance(target, RpcHttpTargetConfig):
|
||||
|
||||
Reference in New Issue
Block a user