community: Bump ruff version to 0.9 (#29206)

Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
Christophe Bornet
2025-02-08 02:21:10 +01:00
committed by GitHub
parent 30f6c9f5c8
commit 723031d548
166 changed files with 5415 additions and 530 deletions

View File

@@ -66,9 +66,9 @@ def get_execute_function_sql_stmt(
else:
parts.append(f"SELECT * FROM {function.full_name}(")
if function.input_params is None or function.input_params.parameters is None:
assert (
not json_params
), "Function has no parameters but parameters were provided."
assert not json_params, (
"Function has no parameters but parameters were provided."
)
else:
args = []
use_named_args = False
@@ -213,17 +213,17 @@ def execute_function(
assert response.status is not None, f"Statement execution failed: {response}"
if response.status.state != StatementState.SUCCEEDED:
error = response.status.error
assert (
error is not None
), f"Statement execution failed but no error message was provided: {response}"
assert error is not None, (
f"Statement execution failed but no error message was provided: {response}"
)
return FunctionExecutionResult(error=f"{error.error_code}: {error.message}")
manifest = response.manifest
assert manifest is not None
truncated = manifest.truncated
result = response.result
assert (
result is not None
), "Statement execution succeeded but no result was provided."
assert result is not None, (
"Statement execution succeeded but no result was provided."
)
data_array = result.data_array
if is_scalar(function):
value = None
@@ -234,9 +234,9 @@ def execute_function(
)
else:
schema = manifest.schema
assert (
schema is not None and schema.columns is not None
), "Statement execution succeeded but no schema was provided."
assert schema is not None and schema.columns is not None, (
"Statement execution succeeded but no schema was provided."
)
columns = [c.name for c in schema.columns]
if data_array is None:
data_array = []