fix: satisfy the lint and docs gates for the view APIs

The refusal test's closure never returns, so its response type needed
naming; the Python binding's tuple needed a type alias; ruff and biome
wanted their formatting; and the generated JS docs needed the four new
verbs and the ViewDescription page.
This commit is contained in:
Jack Ye
2026-09-22 22:09:20 -07:00
parent 5f00e7ddee
commit aca1c2f0bd
9 changed files with 183 additions and 17 deletions
+5 -3
View File
@@ -104,13 +104,15 @@ fn parse_default_namespace_path(path: Option<Bound<'_, PyAny>>) -> PyResult<Vec<
}
}
/// A view description on its way to Python: name, namespace, query, default
/// database, and the schema as pyarrow renders it.
type PyViewDescription = (String, Vec<String>, String, String, Py<PyAny>);
/// A view description as a plain tuple, with the schema converted to the
/// pyarrow schema the caller would get from any other lancedb API. The Python
/// layer names the fields; this keeps the binding free of a class that would
/// have to be kept in step with the Rust struct.
fn view_description_to_py(
view: lancedb::view::ViewDescription,
) -> PyResult<(String, Vec<String>, String, String, Py<PyAny>)> {
fn view_description_to_py(view: lancedb::view::ViewDescription) -> PyResult<PyViewDescription> {
Python::attach(|py| {
let schema = view.schema.to_pyarrow(py)?.unbind();
Ok((