python-code-style

Configure ruff and mypy in pyproject.toml to enforce Python style standards.

3|2|Updated Mar 23, 2026
One-click install
npx skills add https://github.com/wesleyegberto/software-engineering-skills --skill python-code-style-wesleyegberto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-code-style
Source: https://github.com/wesleyegberto/software-engineering-skills/tree/main/plugins/python/skills/python-code-style
Command: npx skills add https://github.com/wesleyegberto/software-engineering-skills --skill python-code-style-wesleyegberto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Python projects often drift without consistent style, formatting, and documentation standards, leading to brittle code and poor readability.

Core Features & Use Cases

  • Automated tooling setup: Configure ruff, mypy, and pyproject.toml for a project.
  • Consistency enforcement: Apply PEP 8-compliant naming conventions and formatting rules across codebases.
  • Documentation by default: Promote Google-style docstrings and inline documentation to improve maintainability.

Quick Start

Install ruff and mypy, then configure pyproject.toml to enforce the standards

Frequently Asked Questions about python-code-style

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure ruff and mypy in pyproject.toml for Python code style enforcement?

To enforce Python code style, you configure ruff and mypy within your pyproject.toml file to define formatting, linting, and type checking rules. This setup ensures PEP 8-compliant naming conventions and documentation standards are applied across your codebase.

What is the best way to enforce Google-style docstrings in an existing Python project?

The best way to enforce Google-style docstrings is by configuring linting tools like ruff in your pyproject.toml to mandate inline documentation. This promotes consistency and improves maintainability across both new and existing Python codebases.

Do I need type hints to run mypy for Python code quality checks?

Yes, type hints are required for mypy to effectively check Python code quality and enforce typing standards. Integrating mypy with type hints in your project ensures static type checking and reduces brittle code during ongoing maintenance.

Can I apply Python code style and naming conventions during project bootstrapping?

Yes, you can apply Python code style and naming conventions during project bootstrapping by setting up ruff and mypy early in your pyproject.toml. Establishing these standards upfront prevents drift and ensures consistent formatting from the start.

Why does my Python project drift without consistent code style and documentation standards?

Python projects drift without consistent code style and documentation standards because there is no automated enforcement of formatting or naming rules. Configuring tools like ruff and mypy enforces PEP 8 compliance and required docstrings to fix readability issues.

Does ruff work with mypy to enforce PEP 8 compliant naming and formatting?

Yes, ruff works with mypy to enforce PEP 8 compliant naming, formatting, and type checking in Python projects. Configuring both tools in pyproject.toml provides comprehensive code quality coverage spanning style and static analysis.