From d462f1d84da927d658c946f66ee7d85a625fac2c Mon Sep 17 00:00:00 2001 From: Heyuan Zeng Date: Fri, 5 Jul 2024 00:37:44 +0100 Subject: [PATCH] Fix clippy warnings --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 98463f7..b2f729d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -208,6 +208,7 @@ impl HashTrieMapPy { } #[classmethod] + #[pyo3(signature = (keys, val=None))] fn fromkeys( _cls: &Bound<'_, PyType>, keys: &Bound<'_, PyAny>, @@ -224,6 +225,7 @@ impl HashTrieMapPy { Ok(HashTrieMapPy { inner }) } + #[pyo3(signature = (key, default=None))] fn get(&self, key: Key, default: Option) -> Option { if let Some(value) = self.inner.get(&key) { Python::with_gil(|py| Some(value.clone_ref(py))) @@ -721,6 +723,7 @@ impl<'source> FromPyObject<'source> for HashTrieSetPy { #[pymethods] impl HashTrieSetPy { #[new] + #[pyo3(signature = (value=None))] fn init(value: Option) -> Self { if let Some(value) = value { value