Problem
In chromadb/db/impl/sqlite_pool.py, the PerThreadPool class has a typo in its class-level attribute annotation:
class PerThreadPool(Pool):
_is_uri_: bool # Line 130 — trailing underscore
...
def __init__(self, db_file: str, is_uri: bool = False):
...
self._is_uri = is_uri # Line 137 — no trailing underscore
The annotation declares _is_uri_ (with trailing underscore) but the actual attribute used throughout the class is _is_uri (without trailing underscore). This is inconsistent with the LockPool class in the same file, which correctly declares _is_uri: bool at line 79.
While this does not cause a runtime error (Python class annotations are not enforced), it:
- Creates confusion for developers reading the code
- Causes type checkers (mypy, pyright) to report
_is_uri as an undeclared attribute
- May cause issues with IDE autocompletion and static analysis
Proposed Fix
Remove the trailing underscore from the annotation:
# Before:
_is_uri_: bool
# After:
_is_uri: bool
Affected File
chromadb/db/impl/sqlite_pool.py (line 130)
Problem
In
chromadb/db/impl/sqlite_pool.py, thePerThreadPoolclass has a typo in its class-level attribute annotation:The annotation declares
_is_uri_(with trailing underscore) but the actual attribute used throughout the class is_is_uri(without trailing underscore). This is inconsistent with theLockPoolclass in the same file, which correctly declares_is_uri: boolat line 79.While this does not cause a runtime error (Python class annotations are not enforced), it:
_is_urias an undeclared attributeProposed Fix
Remove the trailing underscore from the annotation:
Affected File
chromadb/db/impl/sqlite_pool.py(line 130)