pep8listed
Install: claude install-skill hackermanishackerman/claude-skills-vault
# Python Style & PEP 8 Enforcement
Auto-enforce Python 3.11+ standards.
## When to Use
- Writing/reviewing Python code
- Type hint issues or style violations
- User requests PEP 8 check
## Core Standards
| Standard | Desc |
|----------|------|
| PEP 8 | Naming, imports, spacing |
| PEP 484/585 | Type hints (modern) |
| PEP 257 | Docstrings |
| PEP 604 | Union `\|` |
| PEP 570/3102 | `/` positional, `*` keyword |
## Naming
```python
class UserAccount: pass # PascalCase
class HTTPClient: pass # Acronyms: all caps
def calculate_total(): pass # snake_case
async def fetch_data(): pass # async same
user_name = "john" # Variables: snake_case
MAX_RETRIES = 3 # Constants: SCREAMING_SNAKE
def _internal(): pass # Private: underscore
__mangled = "hidden" # Name mangling: double
T = TypeVar("T") # TypeVars: PascalCase
UserT = TypeVar("UserT", bound="User")
```
## Type Hints (3.11+)
### Modern Syntax (Required)
```python
# Built-in generics (NOT typing module)
def process(items: list[str]) -> dict[str, int]: ...
# Union w/ | (NOT Optional/Union)
def find_user(id: str) -> User | None: ...
# Self type
from typing import Self
class Builder:
def chain(self) -> Self: return self
```
### Patterns
```python
from collections.abc import Callable, Awaitable
from typing import TypedDict, Literal, TypeAlias, ParamSpec, Generic
# Callable
Ha