What problem does it solve?
This skill codifies Python coding standards to ensure consistent, readable, and maintainable code across projects, aligning with PEP 8 and project-specific rules.
Core Features & Use Cases
- Naming conventions for modules/packages, classes, functions/methods, variables, constants, private members, and name mangling.
- Code formatting guidelines: indentation, line length, string quotes, trailing commas, and recommended formatters.
- Type hints: enforce Python 3.10+ style hints, explicit return types, and static typing guidance.
- Import order: standard library, third-party, and local imports with isort-friendly structure.
- Docstring standards: Google or NumPy style for public APIs.
- Error handling: explicit exceptions and proper logging or re-raising.
- Class design: use dataclass or pydantic models for data containers.
- Async patterns: prefer async/await for I/O-bound operations and proper async context managers.
- Testing conventions: pytest-oriented guidelines for tests and fixtures.
- Project-specific rules: additional repository-specific conventions.
Quick Start
Apply these rules to your Python project to enforce clean, consistent coding.