Skip to content

Commit 021abd6

Browse files
committed
Fix mypy CI failures and module path conflicts
✅ Address mypy static analysis issues: - Add type ignore comment for yaml import in deepagent.py - Add types-PyYAML dependency to requirements-dev.txt - Add py.typed marker file for proper package typing - Update CI workflow to use --explicit-package-bases flag 🔧 CI workflow improvements: - Fix module name conflict between 'parsers' and 'src.parsers' - Use explicit-package-bases to resolve mypy path mapping issues - Ensure consistent mypy behavior between local and CI environments ✅ Verification completed: - All 78 unit tests passing - Ruff linting clean on src/ directory - Ruff formatting verified This resolves the mypy errors preventing CI from passing while maintaining all existing functionality.
1 parent 6a9cb54 commit 021abd6

File tree

4 files changed

+3
-2
lines changed

4 files changed

+3
-2
lines changed

.github/workflows/python-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
fail_ci_if_error: false
4343
token: ${{ secrets.CODECOV_TOKEN }}
4444
- name: Run mypy static analysis
45-
run: mypy src/ --ignore-missing-imports --exclude "src/llm/router.py"
45+
run: mypy src/ --ignore-missing-imports --exclude "src/llm/router.py" --explicit-package-bases
4646

4747
tests:
4848
name: Run tests matrix

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ mypy==1.9.0
66
ruff==0.4.2
77
python-dotenv==1.0.1
88
PyYAML==6.0.1
9+
types-PyYAML==6.0.12.20240917
910
pre-commit==3.7.1

src/agents/deepagent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from langchain.tools import BaseTool
1313
from langchain_community.chat_message_histories import ChatMessageHistory
1414
from langchain_core.runnables.history import RunnableWithMessageHistory
15-
import yaml
15+
import yaml # type: ignore
1616

1717
# LLM names declared as Any so mypy accepts fallback to None if imports fail
1818
GoogleGenerativeAI: Any

src/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)