Medium
Python
uv scripts and commands
Official
Rule Description
Define scripts in pyproject.toml for common commands:
```toml
[project.scripts]
myapp = "myproject.main:main"
[tool.uv.scripts]
dev = "fastapi dev src/myproject/main.py"
test = "pytest tests/ -v"
lint = "ruff check src/"
format = "ruff format src/"
typecheck = "mypy src/"
```
Run with: `uv run dev`, `uv run test`, etc.
For CI/production:
```bash
# Install dependencies only (no dev)
uv sync --no-dev
# Export to requirements.txt if needed
uv export > requirements.txt
```
Included in Rulesets
Django Best Practices
36 rules • 1 standard
FastAPI Guidelines
36 rules • 1 standard
Python Standards
33 rules • 2 standards
GitHub Actions CI
22 rules • 0 standards
CircleCI Standards
22 rules • 0 standards
Travis CI Standards
22 rules • 0 standards
GitLab CI Standards
22 rules • 0 standards
uv Standards
25 rules • 2 standards
Code Review Standards
58 rules • 0 standards
Add This Rule
Sign in to add this rule to your workspace
Sign in with GitHubDetails
- Severity
- Medium
- Category
- Python
- Used in
- 9 rulesets