From a60ce7100cebcc20ae95732e04bd2c0906b2539c Mon Sep 17 00:00:00 2001 From: Martin Date: Sat, 14 Jan 2023 22:10:11 +0300 Subject: [PATCH] Update the `search` method in the stub file --- CHANGELOG.md | 10 ++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- py_scdb/py_scdb.pyi | 8 ++++++-- pyproject.toml | 2 +- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63f980a..2e86d95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [0.1.1] - 2023-01-14 + +### Added + +### Changed + +- Updated the stub file for the `search()` method. + +### Fixed + ## [0.1.0] - 2023-01-12 ### Added diff --git a/Cargo.lock b/Cargo.lock index 0699224..ca0a6e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -643,7 +643,7 @@ dependencies = [ [[package]] name = "py_scdb" -version = "0.1.0" +version = "0.1.1" dependencies = [ "async-std", "pyo3", diff --git a/Cargo.toml b/Cargo.toml index 230c41f..03e51e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "py_scdb" -version = "0.1.0" +version = "0.1.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/py_scdb/py_scdb.pyi b/py_scdb/py_scdb.pyi index 3df244b..dfe0c1e 100644 --- a/py_scdb/py_scdb.pyi +++ b/py_scdb/py_scdb.pyi @@ -59,7 +59,9 @@ class Store: :param k: the key as a UTF-8 string :return: the value if it exists or None if it doesn't """ - def search(self, term: str, skip: int, limit: int) -> List[Tuple[str, str]]: + def search( + self, term: str, skip: Optional[int] = None, limit: Optional[int] = None + ) -> List[Tuple[str, str]]: """ Finds all key-values whose keys start with the substring `term`. @@ -158,7 +160,9 @@ class AsyncStore: :param k: the key as a UTF-8 string :return: the value if it exists or None if it doesn't """ - async def search(self, term: str, skip: int, limit: int) -> List[Tuple[str, str]]: + async def search( + self, term: str, skip: Optional[int] = None, limit: Optional[int] = None + ) -> List[Tuple[str, str]]: """ Finds all key-values whose keys start with the substring `term`. diff --git a/pyproject.toml b/pyproject.toml index 581b2da..7d0d987 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "py_scdb" -version = "0.1.0" +version = "0.1.1" requires-python = ">=3.7" classifiers = [ "Programming Language :: Rust",