mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-13 14:16:54 +00:00
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:
@@ -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((
|
||||
|
||||
Reference in New Issue
Block a user