What problem does it solve?
Python language standards define a baseline for type hints, error handling, logging, and style conventions to improve code reliability and maintainability.
Core Features & Use Cases
- REJECT: Missing type hints on public functions or methods
- REJECT: Bare
except: without a specific exception type
- REJECT:
print() used in production code (use logging instead)
- REJECT: Mutable default arguments (e.g.,
def f(x=[]):)
- REQUIRE:
from __future__ import annotations in all modules
- REQUIRE: Type hints on all public functions and class attributes
- REQUIRE: Pydantic v2 for data validation models
- PREFER: Early returns over deeply nested conditionals
- PREFER:
pathlib.Path over os.path for filesystem operations
- PREFER: Dataclasses or Pydantic over raw dicts for structured data
Quick Start
Audit a Python module to ensure type hints, proper error handling, and logging are in place.