Python Rules
Python development commands for package management, virtual environments, testing, and script execution with pip and venv.
4 rules
Docstring Standards
Write meaningful docstrings for all public modules, classes, and functions — follow Google style or NumPy style consistently, document parameters, returns, raises, and include examples.
Import Organization and Standards
Organize Python imports in three groups — standard library, third-party, local — with alphabetical sorting within groups, absolute imports preferred, and no wildcard imports.
PEP 8 Code Style Standards
Enforce PEP 8 code style in all Python projects — consistent naming, proper formatting, line length limits, and whitespace conventions verified by automated tools.
Type Hints Required for All Functions
All Python functions must have complete type annotations — parameter types, return types, and generic types verified by mypy or pyright in strict mode for full type safety.