Development Best Practices

Review or refactor Python code specifically for Python idioms, maintainability, typing, API design, or language-level design problems.

rhenter Updated

File contents

Python Best Practices

  • Prefer readable, idiomatic Python and PEP 8.
  • Use type hints for public APIs and non-trivial functions.
  • Avoid mutable default arguments and hidden side effects.
  • Prefer pathlib when appropriate and the standard library when it solves the problem cleanly.
  • Preserve backward compatibility unless breaking changes are explicitly allowed.

rhenter/agent-skills/tree/main/skills/python-best-practices commit 5bc6850ae7

Frequently asked questions

npx skillmds@latest add rhenter/development-best-practices