Skip to main content

Python Style Guide

General Guidelines

  • Follow PEP 8 for Python code style
  • Use type hints for all function parameters and return values
  • Include comprehensive docstrings for all modules, classes, and functions
  • Run mise lint before committing to ensure code quality

Linting and Formatting

Check code quality:
Auto-fix issues:
Format code:
Type checking:

Route Handler Best Practices

Route handlers should be thin wrappers around service functions:

Service Function Best Practices

Service functions should contain the business logic:

TypeScript/JavaScript Style Guide

Web Standards

  • Use TypeScript for all new code
  • Follow Biome configuration for formatting and linting
  • Prefer functional components and hooks

Linting and Formatting

Check code quality:
Auto-fix issues:
Format code:
Type checking:

Commit Message Format

Follow conventional commits format:
Types:
  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting, etc.)
  • refactor: Code refactoring
  • test: Adding or updating tests
  • chore: Maintenance tasks
Example:

Testing Standards

  • Write tests for all new features and bug fixes
  • Maintain or improve code coverage
  • Both unit and integration tests are encouraged
Run tests:

Additional Resources