Registry / testing / wemake-python-styleguide

wemake-python-styleguide

JSON →
library1.6.2pypypiunverified

wemake-python-styleguide is an extremely strict and opinionated Python linter, acting as a flake8 plugin and a companion to ruff. It aims to enforce consistent, maintainable, and less complex code, often surpassing standard PEP8 checks with its extensive rule set. The library is actively maintained with frequent minor releases, currently at version 1.6.1, and supports Python 3.10 and newer.

pip install wemake-python-styleguide
INSTALL
IMPORT
SIG · WEMAKE-PYTHON-STYL
W
wemake-python-styleguide
testingpythonv1.6.2
Install
3.3s avg
Import
Disk
33MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.6.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 30.6MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 3.3s · import 0.000s · 31MB
33MB installed
● package 33MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CLI tool
wps explain <code>
wemake-python-styleguide is primarily used as a flake8 plugin or via its CLI for specific utilities like `wps explain` to look up violation documentation locally. It is not typically imported into Python code for direct use.
flake8 integration
flake8 --select=WPS .
import wemake_python_styleguide
Users typically interact with wemake-python-styleguide indirectly through the flake8 CLI, not by directly importing it as a Python module. The '--select=WPS' flag is crucial for activating its rules.

Install `wemake-python-styleguide` alongside `flake8` and `ruff`. Create a `pyproject.toml` (for Ruff configuration) and/or `setup.cfg` (for Flake8 configuration, including `--select=WPS`). The recommended workflow involves running `ruff format`, `ruff check`, and then `flake8 --select=WPS` sequentially. This ensures Ruff handles most style and formatting, leaving wemake-python-styleguide to apply its unique opinionated rules.

pip install wemake-python-styleguide flake8 ruff # --- pyproject.toml --- # [tool.ruff] # line-length = 88 # Or your preferred length # target-version = "py310" # # [tool.flake8] # select = "WPS" # max-complexity = 10 # max-line-length = 88 # Run ruff first for formatting and many common lints ruff format . ruff check . # Then run wemake-python-styleguide specific checks via flake8 flake8 --select=WPS .
Debug
Known issues
breakingVersion 1.0.0 introduced a significant breaking change by shifting to 'ruff compatibility'. Many rules previously handled by wemake-python-styleguide (and its internal flake8 plugins) were removed and are now expected to be covered by ruff. Users must integrate ruff into their workflow alongside flake8.
fix
Ensure you install and configure 'ruff' (e.g., in `pyproject.toml`) and run `ruff format && ruff check` before `flake8 --select=WPS`. Review the v1.0.0 changelog for removed WPS codes.
affects: >=1.0.0
gotchawemake-python-styleguide is exceptionally strict and opinionated. New users will almost certainly encounter a large number of violations, even on well-written code, and will need to carefully configure ignored rules in `setup.cfg` or `pyproject.toml`.
fix
Start with the default configuration, then systematically address or disable specific rules (e.g., using `# noqa` comments, `per-file-ignores`, or `ignore =` in `setup.cfg`) until your codebase passes. Refer to the documentation for each WPS code.
affects: All
gotchaThe complete linting experience now relies on running *both* `ruff` and `flake8 --select=WPS`. Simply running `flake8` without `ruff` (or without `--select=WPS`) will result in an incomplete set of checks and missed violations.
fix
Always include `ruff format .`, `ruff check .`, and `flake8 --select=WPS .` in your CI/CD pipelines and local pre-commit hooks. Adjust configuration files (e.g., `pyproject.toml` for `ruff`, `setup.cfg` for `flake8`) to match.
affects: >=1.0.0
deprecatedMany specific WPS violation codes were removed in v1.0.0 because their checks are now handled by ruff or pylint. Relying on these old codes in configurations will no longer have an effect.
fix
Review your `flake8` configuration (`setup.cfg`, `.flake8`) and remove any `WPS` codes explicitly listed as removed in the v1.0.0 changelog. Use `ruff`'s corresponding rule codes instead where applicable.
affects: >=1.0.0
gotchaThe linter actively discourages excessive use of `# noqa` comments. The `WPS402` rule will flag modules with too many such comments, indicating potential issues with code quality or over-ignoring rules.
fix
Instead of sprinkling `# noqa` comments, try to refactor code to adhere to the style guide, or disable specific rules globally or per-file in your `setup.cfg` if they truly do not fit your project's needs.
affects: All
Upgrade
Version history
1.6.2latest on PyPI · released Apr 27, 2026
Audit
Dependencies
flake8requiredwemake-python-styleguide is a plugin for flake8 and requires it to run its checks.
ruffoptionalAs of v1.0.0, wemake-python-styleguide is designed as a 'ruff companion'. It delegates many checks and formatting tasks to ruff, making ruff an essential tool for the complete intended linting experience.
pythonrequiredRequired Python interpreter version range.
Agent activity
20 hits · last 30 days
node
16
OpenAI (training)
2
Resources
wemake-python-styleguide — pip install wemake-python-styleguide · libregistry