Code Style¶
Formatting¶
django-docutils uses ruff for both linting and formatting.
$ uv run ruff format .
$ uv run ruff check . --fix --show-fixes
Type Checking¶
Strict mypy with django-stubs is enforced across src/ and tests/.
$ uv run mypy
Docstrings¶
Follow NumPy-style docstrings for all public functions and methods.
Imports¶
Always include
from __future__ import annotationsat the top of Python files.Use
import typing as tand access via namespace:t.Optional,t.Dict, etc.