From 20e60cb6baced82130e12317678b05120a0bf6d1 Mon Sep 17 00:00:00 2001
From: doria <93405247+dr-frmr@users.noreply.github.com>
Date: Thu, 8 Jan 2026 14:02:25 -0500
Subject: [PATCH] chore: fix basedpyright warnings (#317)
---
.../documentation/reference/platform.mdx | 1 -
docs/v2/documentation/reference/platform.mdx | 16 ++++++++--------
src/cache/client.py | 10 +++++-----
tests/conftest.py | 2 +-
4 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/docs/v2.6.0-alpha/documentation/reference/platform.mdx b/docs/v2.6.0-alpha/documentation/reference/platform.mdx
index 34e9e237..88a14c84 100644
--- a/docs/v2.6.0-alpha/documentation/reference/platform.mdx
+++ b/docs/v2.6.0-alpha/documentation/reference/platform.mdx
@@ -173,4 +173,3 @@ Dive into our [API Reference](/v2.6.0-alpha/api-reference) to explore all availa
See Honcho in action with real examples
-
diff --git a/docs/v2/documentation/reference/platform.mdx b/docs/v2/documentation/reference/platform.mdx
index 0c666a5b..522d714d 100644
--- a/docs/v2/documentation/reference/platform.mdx
+++ b/docs/v2/documentation/reference/platform.mdx
@@ -38,7 +38,7 @@ Once you add a valid payment method under the
## 2. Activate your Honcho instance
-With credits and a payment method on file (managed via the [Billing](https://app.honcho.dev/billing) page), your Honcho instance will be provisioned and ready to use. Monitor your machine status, and check for version upgrades on the [Instance Status](https://app.honcho.dev/status) page.
+With credits and a payment method on file (managed via the [Billing](https://app.honcho.dev/billing) page), your Honcho instance will be provisioned and ready to use. Monitor your machine status, and check for version upgrades on the [Instance Status](https://app.honcho.dev/status) page.
@@ -87,20 +87,20 @@ If you prefer, you can set up your queries in the UI and copy to cURL for help w
Build a complete conversation flow without ever leaving the playground:
-1. **Create a Workspace**:
- select `POST Get or Create Workspace` and type workspace name into the request body
+1. **Create a Workspace**:
+ select `POST Get or Create Workspace` and type workspace name into the request body
→ Returns workspace ID
-2. **Create new Peer(s)**:
+2. **Create new Peer(s)**:
select `POST Get or Create Peer,` choose your workspace from the dropdown, and type peer name into the request body. (repeat for each peer)
→ Returns peer ID
-3. **POST Get or Create Session**
- `POST /sessions` selecting your workspace from the dropdown then type session name into the request body
+3. **POST Get or Create Session**
+ `POST /sessions` selecting your workspace from the dropdown then type session name into the request body
→ Returns session ID and adds to dropdown
-4. **POST Create Messages for Session**
- `POST /messages` selecting your workspace & session from the dropdown then type peer id(s) and message content into the request body
+4. **POST Create Messages for Session**
+ `POST /messages` selecting your workspace & session from the dropdown then type peer id(s) and message content into the request body
→ Adds message(s) to the session
## 5. Workspaces
diff --git a/src/cache/client.py b/src/cache/client.py
index 8f06ca46..d4005fb1 100644
--- a/src/cache/client.py
+++ b/src/cache/client.py
@@ -41,12 +41,12 @@ async def init_cache() -> None:
if not is_cache_enabled():
# Use in-memory cache when caching is disabled
logger.info("Cache disabled, using in-memory cache")
- cache.setup("mem://", pickle_type=PicklerType.SQLALCHEMY) # pyright: ignore[reportUnknownMemberType]
+ cache.setup("mem://", pickle_type=PicklerType.SQLALCHEMY)
return
# Setup cache with Redis backend
try:
- cache.setup( # pyright: ignore[reportUnknownMemberType]
+ cache.setup(
settings.CACHE.URL,
pickle_type=PicklerType.SQLALCHEMY,
)
@@ -60,7 +60,7 @@ async def init_cache() -> None:
if settings.SENTRY.ENABLED:
sentry_sdk.capture_exception(setup_err)
# Fallback to in-memory cache
- cache.setup("mem://", pickle_type=PicklerType.SQLALCHEMY) # pyright: ignore[reportUnknownMemberType]
+ cache.setup("mem://", pickle_type=PicklerType.SQLALCHEMY)
return
cache.enable()
@@ -98,7 +98,7 @@ async def init_cache() -> None:
sentry_sdk.capture_exception(e)
# Fallback to in-memory cache
await cache.close()
- cache.setup("mem://", pickle_type=PicklerType.SQLALCHEMY) # pyright: ignore[reportUnknownMemberType]
+ cache.setup("mem://", pickle_type=PicklerType.SQLALCHEMY)
except Exception as e:
logger.warning(
"Unexpected cache error at %s: %s. Falling back to in-memory cache",
@@ -109,7 +109,7 @@ async def init_cache() -> None:
sentry_sdk.capture_exception(e)
# Fallback to in-memory cache
await cache.close()
- cache.setup("mem://", pickle_type=PicklerType.SQLALCHEMY) # pyright: ignore[reportUnknownMemberType]
+ cache.setup("mem://", pickle_type=PicklerType.SQLALCHEMY)
async def close_cache() -> None:
diff --git a/tests/conftest.py b/tests/conftest.py
index 9c11a570..7e6c76b7 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -209,7 +209,7 @@ async def fake_cache_session():
# Setup cache for tests that don't use TestClient (direct CRUD tests)
# For TestClient tests, the app's lifespan handler will also call cache.setup()
# The ContextVar patch above handles any context issues
- cache.setup( # pyright: ignore[reportUnknownMemberType]
+ cache.setup(
"redis://fake-redis:6379/0", pickle_type=PicklerType.SQLALCHEMY, enable=True
)