mirror of
https://github.com/magnus919/agent-skills.git
synced 2026-09-11 19:47:12 +03:00
Add mypy strict type checking, radon cyclomatic complexity analysis, and deptry unused dependency detection. Fix type annotations in eval-coverage.py and release.py to pass strict mypy checks. Resolves 4 agent-readiness signals: type_check, strict_typing, cyclomatic_complexity, unused_dependencies_detection. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
130 lines
3.0 KiB
TOML
130 lines
3.0 KiB
TOML
[tool.ruff]
|
|
target-version = "py310"
|
|
line-length = 100
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"F", # pyflakes (unused imports, variables)
|
|
"W", # pycodestyle warnings
|
|
"I", # isort (import order)
|
|
"N", # pep8-naming (naming conventions)
|
|
"UP", # pyupgrade (modern Python syntax)
|
|
"B", # flake8-bugbear (common bug patterns)
|
|
"C4", # flake8-comprehensions
|
|
"SIM", # flake8-simplify
|
|
"RUF", # ruff-specific rules
|
|
]
|
|
ignore = [
|
|
"E501", # line too long (handled by formatter)
|
|
"N818", # exception class names (not every exception needs "Error" suffix)
|
|
"N802", # function names (test methods and templates use non-snake-case)
|
|
"N806", # variable names (templates use non-snake-case)
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
# Templates and generated code
|
|
"**/templates/*.py" = ["N802", "N803", "N806", "E402"]
|
|
# CLI entry points may shadow builtins intentionally
|
|
"**/cli.py" = ["A001", "A002"]
|
|
# eval_runner modules with deliberate import patterns
|
|
"eval_runner/comparison.py" = ["TCH"]
|
|
"eval_runner/adapter.py" = ["TCH"]
|
|
"eval_runner/manifest.py" = ["E402"]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "double"
|
|
indent-style = "space"
|
|
skip-magic-trailing-comma = false
|
|
line-ending = "auto"
|
|
|
|
[tool.pytest.ini_options]
|
|
minversion = "7.0"
|
|
testpaths = ["scripts", "eval_runner/tests"]
|
|
python_files = "test_*.py"
|
|
python_classes = "*Test*"
|
|
python_functions = "test_*"
|
|
addopts = [
|
|
"-ra",
|
|
"--strict-markers",
|
|
"--tb=short",
|
|
"--durations=10",
|
|
"--cov=scripts",
|
|
"--cov=eval_runner",
|
|
"--cov-report=term-missing",
|
|
"--cov-fail-under=60",
|
|
]
|
|
|
|
[tool.coverage.run]
|
|
branch = true
|
|
source = ["scripts", "eval_runner"]
|
|
omit = [
|
|
"*/tests/*",
|
|
"*/templates/*",
|
|
"*/test_*.py",
|
|
]
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"if __name__ == .__main__.:",
|
|
"raise NotImplementedError",
|
|
]
|
|
|
|
[tool.mypy]
|
|
strict = true
|
|
python_version = "3.10"
|
|
warn_unreachable = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = [
|
|
"eval_runner.tests.*",
|
|
"eval_runner.openai_adapter",
|
|
"eval_runner.fake_adapter",
|
|
"test-eval-coverage",
|
|
"test-eval-validation",
|
|
"check-artifacts",
|
|
]
|
|
ignore_errors = true
|
|
|
|
[tool.radon]
|
|
cc_min = "B"
|
|
|
|
[tool.deptry]
|
|
requirements_files = ["requirements-dev.txt"]
|
|
extend_exclude = [
|
|
"agent-council",
|
|
"bundles",
|
|
"templates",
|
|
"tests",
|
|
"life-coach",
|
|
"raleigh",
|
|
"forgejo-cli",
|
|
"jellyfin-cli",
|
|
"comic-chat",
|
|
"fireflies",
|
|
"linear",
|
|
"autogen",
|
|
"crewai",
|
|
"dspy",
|
|
"haystack",
|
|
"langchain",
|
|
"langgraph",
|
|
"llamaindex",
|
|
"nous-branding",
|
|
"open-knowledge-format",
|
|
"color-management",
|
|
"data-scientist",
|
|
"data-architect",
|
|
"esp32-development",
|
|
"site-reliability-engineering",
|
|
"opensource-contributions",
|
|
"artifact-pyramids",
|
|
"woodpecker-ci",
|
|
"yc-default-alive-calculator",
|
|
"yc-weekly-growth-compass",
|
|
]
|
|
[tool.deptry.per_rule_ignores]
|
|
DEP002 = ["ruff", "pytest", "pytest-cov", "mypy", "radon", "deptry", "requests", "types-jsonschema"]
|
|
DEP001 = ["eval_validation"]
|