Enforces PEP 7 and PEP 8 compliance for CPython development, ensuring code quality and consistency across Python and C files.
The CPython Style skill provides a comprehensive set of guidelines and automated workflows for developers contributing to the CPython core. It automates the validation of PEP 8 (Python) and PEP 7 (C) standards, enforces strict whitespace rules, and prevents the addition of prohibited type annotations in the standard library. By integrating with pre-commit hooks and the patchcheck utility, it streamlines the contribution process and ensures all changes meet the rigorous quality requirements of the Python core development team.
Key Features
01Strict enforcement of trailing whitespace and final newline rules
02Validation of CPython-specific policies like no-type-annotations-in-Lib
03Integrated patchcheck and pre-commit workflow automation
048 GitHub stars
05Guidance on reStructuredText and docstring documentation standards
06Automated PEP 7 (C) and PEP 8 (Python) compliance checking
Use Cases
01Automating the cleanup of trailing whitespace and formatting in C and Python files
02Validating local changes before submitting a pull request to the CPython repository
03Checking documentation files for Sphinx/reST compliance before a build