Repolode
wemake-services

wemake-services/wemake-python-styleguide

A strict, opinionated flake8 plugin that enforces consistent, simple Python code style and flags complex code patterns.

Stars
2,944
Forks
439
Open issues
11
Last commit
yesterday

What is it?

wemake-python-styleguide is a flake8 plugin that adds a large set of strict rules to Python linting. Its goal is to make codebases consistent, so that any developer writes code in the same obvious way, and to reduce complexity that makes code hard to maintain.

It runs as a normal flake8 plugin, so it fits into existing flake8 workflows. Its rules are selected with the WPS prefix, and violations can be switched off individually. The project positions itself as a companion to ruff: ruff handles formatting, while this plugin checks for complex code, style inconsistencies and common errors. It also provides a GitHub Action, an online trial, and an MCP server with an agent skill for AI coding tools.

The project is aimed at teams that want a strict, uniform Python style and are willing to accept opinionated rules. It is not intended to check types, which is left to mypy, or to replace tests.

Key features

  • 01Adds many strict rules on top of flake8, selected with the WPS prefix.
  • 02Flags complex code and common mistakes that other linters may miss.
  • 03Can be used alongside ruff, which handles formatting.
  • 04Individual rules can be disabled through configuration.
  • 05Provides a GitHub Action for CI integration.
  • 06Offers an MCP server and agent skill to help AI tools write compliant code.

Use cases

  • Enforcing one consistent Python style across a team's codebase.
  • Adding a strict quality gate to CI through flake8 or GitHub Actions.
  • Cleaning up a legacy Python project incrementally, with rules switched off as needed.
  • Guiding AI coding agents toward simpler, idiomatic Python.

Quick start

  1. 1

    Install the package with pip

    pip install wemake-python-styleguide
  2. 2

    Create a setup.cfg file with the configuration from the docs

  3. 3

    Run the linter on your module

    flake8 your_module.py --select=WPS

Things to know

  • It is a strict, opinionated linter that flags many rules, so expect to disable some for existing code.
  • Setup requires writing a configuration file before it is useful.

In collections

Topics

FAQ

What is wemake-python-styleguide?
A strict, opinionated flake8 plugin that enforces consistent, simple Python code style and flags complex code patterns. wemake-python-styleguide is a flake8 plugin that adds a large set of strict rules to Python linting. Its goal is to make codebases consistent, so that any developer writes code in the same obvious way, and to reduce complexity that makes code hard to maintain.
Is wemake-python-styleguide free to use? What license does it have?
wemake-python-styleguide is open source under the MIT license. Check the license terms before using it in commercial products.
Is wemake-python-styleguide still maintained?
Actively maintained. The last commit to wemake-python-styleguide was on Nov 6, 2026.
What can I use wemake-python-styleguide for?
Enforcing one consistent Python style across a team's codebase. Adding a strict quality gate to CI through flake8 or GitHub Actions. Cleaning up a legacy Python project incrementally, with rules switched off as needed. Guiding AI coding agents toward simpler, idiomatic Python.
How do I install wemake-python-styleguide?
Install the package with pip: pip install wemake-python-styleguide Create a setup.cfg file with the configuration from the docs Run the linter on your module: flake8 your_module.py --select=WPS
Where can I get wemake-python-styleguide?
The source code and installation instructions are on GitHub: https://github.com/wemake-services/wemake-python-styleguide

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects