mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-05 09:31:05 -05:00
Add pyo3 signature annotations with default values for all Py* structs (#7891)
* Add pyo3 signature annotations with default values for all Py* structs - Added #[pyo3(signature = (...))] attributes to all Py* structs with optional parameters - Ensured non-default parameters come before parameters with defaults - Follows the pattern established in PyScrollRequest - Updated structs: PySearchRequest, PySearchParams, PyQuantizationSearchParams, PyAcornSearchParams, PyQueryRequest, PyPrefetch, PyOrderBy, PyMmr, PyPoint, PyFormula, PyShard::load, PySparseVectorDataConfig, PySparseIndexConfig * fix params ordering
This commit is contained in:
committed by
generall
parent
93d866f18c
commit
8cdc8dea94
@@ -36,6 +36,7 @@ impl PySparseVectorDataConfig {
|
||||
#[pymethods]
|
||||
impl PySparseVectorDataConfig {
|
||||
#[new]
|
||||
#[pyo3(signature = (index, storage_type, modifier = None))]
|
||||
pub fn new(
|
||||
index: PySparseIndexConfig,
|
||||
storage_type: PySparseVectorStorageType,
|
||||
@@ -98,14 +99,15 @@ pub struct PySparseIndexConfig(SparseIndexConfig);
|
||||
#[pymethods]
|
||||
impl PySparseIndexConfig {
|
||||
#[new]
|
||||
#[pyo3(signature = (index_type, full_scan_threshold = None, datatype = None))]
|
||||
pub fn new(
|
||||
full_scan_threshold: Option<usize>,
|
||||
index_type: PySparseIndexType,
|
||||
full_scan_threshold: Option<usize>,
|
||||
datatype: Option<PyVectorStorageDatatype>,
|
||||
) -> Self {
|
||||
Self(SparseIndexConfig {
|
||||
full_scan_threshold,
|
||||
index_type: SparseIndexType::from(index_type),
|
||||
full_scan_threshold,
|
||||
datatype: datatype.map(VectorStorageDatatype::from),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user