Skip to content

[BUG](db): PerThreadPool class annotation has trailing underscore typo (_is_uri_ vs _is_uri) #7292

Description

@rtmalikian

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:

  1. Creates confusion for developers reading the code
  2. Causes type checkers (mypy, pyright) to report _is_uri as an undeclared attribute
  3. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions