← ClaudeAtlas

python-standardslisted

Python code quality standards covering PEP 8, Black formatting, type hints, Google-style docstrings, and error handling. Use when writing or reviewing Python code. TRIGGER when: python, formatting, type hints, docstrings, PEP 8, black, isort. DO NOT TRIGGER when: non-Python files, markdown, config, shell scripts.
akaszubski/autonomous-dev · ★ 29 · AI & Automation · score 68
Install: claude install-skill akaszubski/autonomous-dev
# Python Standards Skill Python code quality standards for autonomous-dev project. ## When This Activates - Writing Python code - Code formatting - Type hints - Docstrings - Keywords: "python", "format", "type", "docstring" --- ## Code Style (PEP 8 + Black) | Setting | Value | |---------|-------| | Line length | 100 characters | | Indentation | 4 spaces (no tabs) | | Quotes | Double quotes | | Imports | Sorted with isort | ```bash black --line-length=100 src/ tests/ isort --profile=black --line-length=100 src/ tests/ ``` --- ## Type Hints (Required) **Rule:** All public functions must have type hints on parameters and return. ```python def process_file( input_path: Path, output_path: Optional[Path] = None, *, max_lines: int = 1000 ) -> Dict[str, any]: """Type hints on all parameters and return.""" pass ``` --- ## Docstrings (Google Style) **Rule:** All public functions/classes need docstrings with Args, Returns, Raises. ```python def process_data(data: List[Dict], *, batch_size: int = 32) -> ProcessResult: """Process data with validation. Args: data: Input data as list of dicts batch_size: Items per batch (default: 32) Returns: ProcessResult with items and metrics Raises: ValueError: If data is empty """ ``` --- ## Error Handling **Rule:** Error messages must include context + expected + docs link. ```python # ✅ GOOD raise FileNotFoundError( f"Config file not found: {path}\n