| name | pyhd |
| description | Python development workflow using Ruff for linting and formatting. Use when writing, refactoring, or documenting Python code. |
Pyhd (Python Development)
This workflow outlines the standard development process for Python projects using Ruff to format and lint code.
Development Cycle
Run these steps for each file change:
- Understand context: Read the file to understand its purpose. If you use external packages, check their API documentation first.
- Apply changes: Use editing tools or replacement methods to modify the code.
- Format and lint: Format the code and fix style issues immediately after editing. Run:
uv run ruff check --fix <filename>
uv run ruff format <filename>
Resolve any remaining errors manually before continuing.
- Test: Run the test suite to verify that your changes did not introduce regressions.
API Documentation
Verify package APIs before writing or modifying code.
Best Practices
Detailed coding standards and idiomatic Python patterns are located in best_practices.md.