chore: migrate CI workflows to uv and update dev tooling (#3426)

chore(dev): update tooling & CI workflows

- Upgrade ruff, mypy (strict), pre-commit; add hooks, stubs, config consolidation
- Add bandit to dev deps and update uv.lock
- Enhance ruff rules (modern Python style, B006 for mutable defaults)
- Update workflows to use uv, matrix strategy, and changed-file type checking
- Include tests in type checking; fix job names and add summary job for branch protection
This commit is contained in:
Greyson LaLonde
2025-09-02 12:35:02 -04:00
committed by GitHub
parent dada9f140f
commit 92d71f7f06
8 changed files with 272 additions and 208 deletions

View File

@@ -74,9 +74,10 @@ qdrant = [
[tool.uv]
dev-dependencies = [
"ruff>=0.8.2",
"mypy>=1.10.0",
"pre-commit>=3.6.0",
"ruff>=0.12.11",
"mypy>=1.17.1",
"pre-commit>=4.3.0",
"bandit>=1.8.6",
"pillow>=10.2.0",
"cairosvg>=2.7.1",
"pytest>=8.0.0",
@@ -88,15 +89,43 @@ dev-dependencies = [
"pytest-timeout>=2.3.1",
"pytest-xdist>=3.6.1",
"pytest-split>=0.9.0",
"types-requests==2.32.*",
"types-pyyaml==6.0.*",
"types-regex==2024.11.6.*",
"types-appdirs==1.4.*",
]
[project.scripts]
crewai = "crewai.cli.cli:crewai"
[tool.ruff]
exclude = [
"src/crewai/cli/templates",
]
fix = true
[tool.ruff.lint]
select = [
"B006",
"UP006",
"UP007",
"UP035",
"UP037",
"UP040",
"UP004",
"UP008",
"UP010",
"UP018",
"UP031",
"UP032",
"UP034",
"I001",
"I002",
]
[tool.mypy]
ignore_missing_imports = true
disable_error_code = 'import-untyped'
exclude = ["cli/templates"]
strict = true
exclude = ["src/crewai/cli/templates"]
[tool.bandit]
exclude_dirs = ["src/crewai/cli/templates"]