Skip to content

Commit 87dfcc0

Browse files
committed
fix: Remove unused type: ignore comments for mypy
The type: ignore comments were only needed when the except block executes, but CI runs with LangChain 1.0+ so the try block succeeds. Mypy flags these as unused-ignore errors.
1 parent 4ea52bb commit 87dfcc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

posthog/ai/langchain/callbacks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
from langchain_core.agents import AgentAction, AgentFinish
2727
except (ImportError, ModuleNotFoundError):
2828
# Fallback for older LangChain versions
29-
from langchain.callbacks.base import BaseCallbackHandler # type: ignore
30-
from langchain.schema.agent import AgentAction, AgentFinish # type: ignore
29+
from langchain.callbacks.base import BaseCallbackHandler
30+
from langchain.schema.agent import AgentAction, AgentFinish
3131
from langchain_core.documents import Document
3232
from langchain_core.messages import (
3333
AIMessage,

0 commit comments

Comments
 (0)