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
@@ -21,6 +21,11 @@ SCHEMA = pa.schema(
)
def test_lsm_write_spec_module_metadata():
assert lancedb.LsmWriteSpec is LsmWriteSpec
assert LsmWriteSpec.__module__ == "lancedb._lancedb"
def _batch(ids, vs):
return pa.RecordBatch.from_arrays(
[pa.array(ids, type=pa.utf8()), pa.array(vs, type=pa.int32())],