refactor(cli): 移动CliRunner到顶层runner模块并清理冗余代码
This commit is contained in:
+17
-19
@@ -26,7 +26,6 @@ pymake = "pyflowx.cli.pymake:main"
|
||||
dev = [
|
||||
"hatch>=1.14.2",
|
||||
"httpx>=0.28.0",
|
||||
"mypy >= 1.0",
|
||||
"prek>=0.4.5",
|
||||
"pytest-asyncio>=0.24.0",
|
||||
"pytest-cov>=5.0.0",
|
||||
@@ -49,21 +48,6 @@ packages = ["src/pyflowx"]
|
||||
[tool.hatch.build.targets.wheel.force-include]
|
||||
"src/pyflowx/py.typed" = "pyflowx/py.typed"
|
||||
|
||||
[tool.mypy]
|
||||
# mypy 2.x requires a >=3.10 target. We check against 3.10 syntax; the
|
||||
# runtime stays 3.8-compatible via `from __future__ import annotations`
|
||||
# (all annotations are strings at runtime) and the graphlib_backport
|
||||
# conditional dependency for topological sorting.
|
||||
check_untyped_defs = true
|
||||
disallow_incomplete_defs = true
|
||||
disallow_untyped_defs = true
|
||||
files = ["src/pyflowx"]
|
||||
ignore_missing_imports = false
|
||||
python_version = "3.8"
|
||||
strict = true
|
||||
warn_return_any = true
|
||||
warn_unused_configs = true
|
||||
|
||||
[tool.uv.sources]
|
||||
pyflowx = { workspace = true }
|
||||
|
||||
@@ -81,9 +65,23 @@ omit = ["src/pyflowx/examples/*", "tests/*"]
|
||||
source = ["pyflowx"]
|
||||
|
||||
[tool.coverage.report]
|
||||
exclude_lines = ["if TYPE_CHECKING:", "if __name__ == .__main__.:", "pragma: no cover", "raise NotImplementedError"]
|
||||
fail_under = 95
|
||||
show_missing = true
|
||||
exclude_lines = [
|
||||
"if TYPE_CHECKING:",
|
||||
"if __name__ == .__main__.:",
|
||||
"pragma: no cover",
|
||||
"raise NotImplementedError",
|
||||
]
|
||||
fail_under = 95
|
||||
show_missing = true
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_default_fixture_loop_scope = "function"
|
||||
|
||||
[tool.basedpyright]
|
||||
exclude = ["**/.git", "**/.venv", "**/__pycache__", "**/build", "**/dist"]
|
||||
include = ["src"]
|
||||
pythonVersion = "3.8"
|
||||
reportImplicitStringConcatenation = "error"
|
||||
reportMissingTypeStubs = "none"
|
||||
reportUnusedCallResult = "warning"
|
||||
typeCheckingMode = "recommended" # 类型检查严格度:off / basic / standard / recommended(默认) / strict / all
|
||||
|
||||
Reference in New Issue
Block a user