08eb743ea9
- 将所有 `Optional[T]` 替换为 `T | None` - 将所有 `List[T]`/`Dict[K, V]`/`Tuple[Ts, ...]` 替换为对应原生泛型 - 调整类型导入,移除冗余的 typing 导入项 - 更新项目依赖,添加 typing-extensions 兼容旧版本 Python - 重构部分函数签名与内部实现以匹配新类型语法
135 lines
3.8 KiB
TOML
135 lines
3.8 KiB
TOML
[project]
|
|
authors = [{ name = "pyflowx" }]
|
|
classifiers = [
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
|
]
|
|
dependencies = [
|
|
"graphlib_backport >= 1.0.0; python_version < '3.9'",
|
|
"typing-extensions>=4.13.2",
|
|
]
|
|
description = "Lightweight, type-safe DAG task scheduler with multi-strategy execution."
|
|
keywords = ["async", "dag", "scheduler", "task", "workflow"]
|
|
license = { text = "MIT" }
|
|
name = "pyflowx"
|
|
readme = "README.md"
|
|
requires-python = ">=3.8"
|
|
version = "0.1.2"
|
|
|
|
[project.scripts]
|
|
pymake = "pyflowx.cli.pymake:main"
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"basedpyright>=1.39.8",
|
|
"hatch>=1.14.2",
|
|
"httpx>=0.28.0",
|
|
"prek>=0.4.5",
|
|
"pytest-asyncio>=0.24.0",
|
|
"pytest-cov>=5.0.0",
|
|
"pytest-html>=4.1.1",
|
|
"pytest-mock>=3.14.0",
|
|
"pytest-xdist>=3.6.1",
|
|
"pytest>=8.0.0",
|
|
"ruff>=0.8.0",
|
|
"tox-uv>=1.13.1",
|
|
"tox>=4.25.0",
|
|
]
|
|
|
|
[build-system]
|
|
build-backend = "hatchling.build"
|
|
requires = ["hatchling"]
|
|
|
|
[[tool.uv.index]]
|
|
default = true
|
|
url = "https://mirrors.aliyun.com/pypi/simple/"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/pyflowx"]
|
|
|
|
[tool.hatch.build.targets.wheel.force-include]
|
|
"src/pyflowx/py.typed" = "pyflowx/py.typed"
|
|
|
|
[tool.uv.sources]
|
|
pyflowx = { workspace = true }
|
|
|
|
[dependency-groups]
|
|
dev = ["pyflowx[dev]"]
|
|
|
|
[tool.coverage.run]
|
|
branch = true
|
|
concurrency = ["thread"]
|
|
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
|
|
|
|
[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
|
|
|
|
# Ruff 配置 - 与 .pre-commit-config.yaml 保持一致
|
|
[tool.ruff]
|
|
target-version = "py38"
|
|
line-length = 88
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"F", # Pyflakes
|
|
"I", # isort
|
|
"B", # flake8-bugbear
|
|
"C4", # flake8-comprehensions
|
|
"UP", # pyupgrade
|
|
"ARG", # flake8-unused-arguments
|
|
"SIM", # flake8-simplify
|
|
"PTH", # flake8-use-pathlib
|
|
"PL", # Pylint
|
|
"RUF", # Ruff-specific rules
|
|
]
|
|
ignore = [
|
|
"E501", # line too long (handled by formatter)
|
|
"PLR0913", # too many arguments
|
|
"PLR2004", # magic value comparison
|
|
"PTH123", # pathlib open() replacement
|
|
"SIM108", # use ternary operator
|
|
"RUF001", # ambiguous unicode characters in string
|
|
"RUF002", # ambiguous unicode characters in docstring
|
|
"RUF003", # ambiguous unicode characters in comment
|
|
"RUF012", # mutable class attributes (intentional for config)
|
|
"PLC0415", # import should be at top-level (intentional for lazy imports)
|
|
"PLR0915", # too many statements (intentional for complex methods)
|
|
"PTH119", # os.path.basename (intentional for sys.argv)
|
|
]
|
|
|
|
[tool.ruff.lint.isort]
|
|
known-first-party = ["pyflowx"]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "double"
|
|
indent-style = "space"
|
|
docstring-code-format = true
|