Skip to content

Configure ruff and mypy #59

@marcgibbons

Description

@marcgibbons

Ruff

Temporary suppresses are in place in pyproject.toml. Work through these incrementally:

  • ANN — add type annotations throughout goodconf/ and tests/
  • PTH — replace os.path usage with pathlib in goodconf/__init__.py
  • TRY003 / TRY004 — refactor exception messages and types
  • EM102 — move exception messages out of f-strings
  • TC002 — move type-only imports into TYPE_CHECKING blocks
  • TID252 — enforce absolute imports

mypy

ignore_errors = true is set as a starter config. 14 known errors exist:

  • Type mismatches in the lazy import pattern (_load_config)
  • Missing keys in GoodConfConfigDict TypedDict
  • Missing Django stubs (django-stubs)

Tighten progressively: remove ignore_errors = true, fix errors one rule group at a time, add django-stubs to dev deps.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions