From 208f26af4ee5dd7b477677ccb68a60a03c5dcb95 Mon Sep 17 00:00:00 2001 From: Ddupg Date: Wed, 17 Dec 2025 11:44:28 +0800 Subject: [PATCH] feat(python): add DatasetBasePath stub to improve IDE hints Change-Id: Idc3be605773007f0e1b148040d5ed3564d2bf2cb --- python/python/lance/lance/__init__.pyi | 9 +++++++++ python/src/dataset.rs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/python/python/lance/lance/__init__.pyi b/python/python/lance/lance/__init__.pyi index 6e5e40fc23b..ff8d5e4e4d5 100644 --- a/python/python/lance/lance/__init__.pyi +++ b/python/python/lance/lance/__init__.pyi @@ -582,5 +582,14 @@ class ScanStatistics: str, int ] # Additional metrics for debugging purposes. Subject to change. +class DatasetBasePath: + def __init__( + self, + path: str, + name: Optional[str] = None, + is_dataset_root: bool = False, + id: Optional[int] = None, + ) -> None: ... + __version__: str language_model_home: Callable[[], str] diff --git a/python/src/dataset.rs b/python/src/dataset.rs index beb8a06537d..68031cc3c70 100644 --- a/python/src/dataset.rs +++ b/python/src/dataset.rs @@ -389,7 +389,7 @@ impl<'py> IntoPyObject<'py> for PyLance<&ColumnOrdering> { } /// Python binding for BasePath -#[pyclass(name = "DatasetBasePath", module = "lance")] +#[pyclass(name = "DatasetBasePath", module = "_lib")] #[derive(Clone)] pub struct DatasetBasePath { #[pyo3(get)]