black
for consistent formatting. - Use ruff
for linting and automatic fixes. - Use mypy
with strict settings for type enforcement. - Annotate all function signatures with types. - Avoid long functions (>40 lines), extract helpers. - Respect SOLID principles — single responsibility per module. - Eliminate dead code and unused imports. - Maintain clean folder structure (services/
, routes/
, schemas/
).