Skip to content

Commit

Permalink
[ENH] Rust mypy stubs for precommit (#3564)
Browse files Browse the repository at this point in the history
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
   - Adds the pyi file and gives it to mypy
 - New functionality
   - None

## Test plan
*How are these changes tested?*
- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
None

---------

Co-authored-by: Max Isom <[email protected]>
  • Loading branch information
HammadB and codetheweb authored Jan 25, 2025
1 parent 52e1dcd commit abc698e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions chromadb/api/rust.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ def get_tenant(self, name: str) -> Tenant:

@override
def heartbeat(self) -> int:
# TODO(hammadb): the precommit hooks don't know about the .pyi file
return self.bindings.heartbeat() # type: ignore
return self.bindings.heartbeat()

@override
def count_collections(
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ asyncio_mode = "auto"

[tool.mypy]
ignore_errors = false
mypy_path = "rust/python_bindings"

[[tool.mypy.overrides]]
module = ["chromadb.proto.*"]
Expand Down

0 comments on commit abc698e

Please sign in to comment.