
- Set up project structure - Configure SQLite database with SQLAlchemy - Create item model and schema - Set up Alembic for database migrations - Implement CRUD operations for items - Add health check endpoint - Add API documentation - Configure Ruff for linting - Update README with project information
36 lines
1008 B
TOML
36 lines
1008 B
TOML
[tool.ruff]
|
|
# A specific subset of all checks is enabled, as per specific needs.
|
|
line-length = 88
|
|
target-version = "py310"
|
|
|
|
[tool.ruff.lint]
|
|
# Enable flake8-bugbear (`B`) rules.
|
|
select = ["E", "F", "B", "I"]
|
|
|
|
# Exclude a variety of commonly ignored directories.
|
|
exclude = [
|
|
".git",
|
|
".github",
|
|
".venv",
|
|
"venv",
|
|
".env",
|
|
"env",
|
|
"__pycache__",
|
|
".mypy_cache",
|
|
".pytest_cache",
|
|
]
|
|
|
|
# Allow unused variables when underscore-prefixed.
|
|
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
|
|
[tool.ruff.lint.mccabe]
|
|
# Unlike Flake8, default to a complexity level of 10.
|
|
max-complexity = 10
|
|
|
|
[tool.ruff.lint.isort]
|
|
known-third-party = ["fastapi", "pydantic", "sqlalchemy", "alembic"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"__init__.py" = ["F401"] # Ignore unused imports in __init__ files
|
|
"app/api/deps.py" = ["B008"] # Ignore function calls in default arguments (common in FastAPI)
|
|
"app/api/endpoints/*.py" = ["B008"] # Ignore function calls in default arguments for endpoints |