Skip to content

Commit b0a4d2f

Browse files
yunlongwenqwencoder
andcommitted
fix: 修复 mypy 类型检查错误
- 添加 types-psutil 依赖 - 配置 mypy 忽略 _pytest 和 pytest 目录 - 添加 psutil 的 ignore_missing_imports Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
1 parent 6e85f7a commit b0a4d2f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ dev = [
8585
"pytest-asyncio>=0.21.0",
8686
"pytest-cov>=4.1.0",
8787
"types-PyYAML",
88+
"types-psutil",
8889
"pre-commit>=3.6.0",
8990
]
9091

@@ -161,6 +162,7 @@ warn_redundant_casts = true
161162
warn_unused_ignores = true
162163
warn_no_return = true
163164
strict_equality = true
165+
exclude = ["_pytest", "pytest"]
164166

165167
[[tool.mypy.overrides]]
166168
module = "tree_sitter.*"
@@ -170,6 +172,10 @@ ignore_missing_imports = true
170172
module = "langchain.*"
171173
ignore_missing_imports = true
172174

175+
[[tool.mypy.overrides]]
176+
module = "psutil.*"
177+
ignore_missing_imports = true
178+
173179
# Pytest configuration
174180
[tool.pytest.ini_options]
175181
testpaths = ["tests"]

0 commit comments

Comments
 (0)