fix(python): set LsmWriteSpec module metadata (#3995)

PyO3 exposed `LsmWriteSpec` with its default `builtins` module, causing
mkdocstrings to resolve the public `lancedb.LsmWriteSpec` re-export as
`builtins.LsmWriteSpec` and fail the documentation build. Declare the
native extension module and pin the public re-export with a regression
test.

This also applies the repository's current Ruff formatter to seven
previously unformatted Python scripts.
This commit is contained in:
Xuanwo
2026-08-21 16:37:48 +08:00
committed by GitHub
parent c1331e5083
commit 7adcffc2b4
9 changed files with 39 additions and 16 deletions
+1 -1
View File
@@ -262,7 +262,7 @@ fn fmt_maintained(maintained: &Option<Vec<String>>) -> String {
/// classmethods, then optionally chain `with_maintained_indexes(...)` and
/// `with_writer_config_defaults(...)`. A fresh spec maintains every index the
/// MemWAL supports, resolved on install.
#[pyclass(from_py_object)]
#[pyclass(module = "lancedb._lancedb", from_py_object)]
#[derive(Clone, Debug)]
pub struct LsmWriteSpec {
inner: lancedb::table::LsmWriteSpec,