Instruction file imported from Level42-dev/BinderPokedex (
.github/instructions/python.instructions.md). Copyright stays with the author.
Python conventions for BinderPokedex
- Prefer
pathlib.Pathover manual path string handling. - Keep fetcher, PDF generation, and shared library responsibilities separated; avoid mixing API access, persistence, and rendering in one module.
- Preserve CLI entry points and argument behavior in
scripts/fetcher/fetch.py,scripts/pdf/generate_pdf.py, and related scripts unless the task explicitly changes them. - For tests, prefer a shared bootstrap such as
scripts/tests/conftest.pyover repeatingsys.pathmanipulation inside each test file. - Keep new compatibility shims small and explicit when supporting legacy imports or older helper names.
- For font or rendering changes, prefer explicit fallback behavior and assertions over silent best-effort behavior that hides broken output.