Skip to content

Commit a60ce71

Browse files
committed
Update the search method in the stub file
1 parent 5fa0be5 commit a60ce71

5 files changed

Lines changed: 19 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
## [0.1.1] - 2023-01-14
11+
12+
### Added
13+
14+
### Changed
15+
16+
- Updated the stub file for the `search()` method.
17+
18+
### Fixed
19+
1020
## [0.1.0] - 2023-01-12
1121

1222
### Added

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "py_scdb"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

py_scdb/py_scdb.pyi

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ class Store:
5959
:param k: the key as a UTF-8 string
6060
:return: the value if it exists or None if it doesn't
6161
"""
62-
def search(self, term: str, skip: int, limit: int) -> List[Tuple[str, str]]:
62+
def search(
63+
self, term: str, skip: Optional[int] = None, limit: Optional[int] = None
64+
) -> List[Tuple[str, str]]:
6365
"""
6466
Finds all key-values whose keys start with the substring `term`.
6567
@@ -158,7 +160,9 @@ class AsyncStore:
158160
:param k: the key as a UTF-8 string
159161
:return: the value if it exists or None if it doesn't
160162
"""
161-
async def search(self, term: str, skip: int, limit: int) -> List[Tuple[str, str]]:
163+
async def search(
164+
self, term: str, skip: Optional[int] = None, limit: Optional[int] = None
165+
) -> List[Tuple[str, str]]:
162166
"""
163167
Finds all key-values whose keys start with the substring `term`.
164168

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "py_scdb"
7-
version = "0.1.0"
7+
version = "0.1.1"
88
requires-python = ">=3.7"
99
classifiers = [
1010
"Programming Language :: Rust",

0 commit comments

Comments
 (0)