Skip to content

Commit

Permalink
Update the search method in the stub file
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinitto committed Jan 14, 2023
1 parent 5fa0be5 commit a60ce71
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 6 additions & 2 deletions py_scdb/py_scdb.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit a60ce71

Please sign in to comment.