Skip to content

Commit 436dc5d

Browse files
committed
chore: pyright 覆盖 tests/tools + executionEnvironments 放宽
1 parent 7067c29 commit 436dc5d

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ line-length = 100
3636
select = ["E", "F", "I", "UP", "B"]
3737

3838
[tool.pyright]
39-
include = ["custom", "aao"]
40-
extraPaths = ["custom", "aao"]
39+
include = ["custom", "aao", "tests", "tools"]
40+
extraPaths = ["custom", "aao", "tests", "tests/replay"]
4141
pythonVersion = "3.13"
4242
typeCheckingMode = "strict"
4343

@@ -52,6 +52,18 @@ reportUnknownParameterType = "none"
5252
reportUnknownLambdaType = "none"
5353
reportMissingTypeArgument = "none"
5454

55+
# tests: 访问 protected 成员 + 解构未使用变量是测试常见模式
56+
[[tool.pyright.executionEnvironments]]
57+
root = "tests"
58+
reportPrivateUsage = "none"
59+
reportUnusedVariable = "none"
60+
61+
# tools: 工具脚本允许访问 protected 成员 + 解构未使用变量
62+
[[tool.pyright.executionEnvironments]]
63+
root = "tools"
64+
reportPrivateUsage = "none"
65+
reportUnusedVariable = "none"
66+
5567
[tool.pytest.ini_options]
5668
testpaths = ["tests"]
5769
pythonpath = ["."]

0 commit comments

Comments
 (0)