github wemake-services/wemake-python-styleguide 1.8.0
Version 1.8.0 aka The Slop Slayer

one hour ago

This release makes WPS a first-class citizen in AI-assisted workflows
and adds python3.15 support with new rules for its features.

AI features

wemake-python-styleguide is crazy good at improving the agents' code quality.
Use it in your workflows to make the final code simpler and more readable.

MCP server for violation explanations

An optional MCP server exposes an explain_violation tool,
so your agent can look up any WPS rule locally —
same docs as the website, no internet access needed (#3770):

pip install 'wemake-python-styleguide[mcp]'
mcp run wemake_python_styleguide/mcp.py:mcp

Now, when the agent hits an unfamiliar violation:

> flake8 --select=WPS .
  example.py:14:1: WPS482 Found a lazy import

> explain_violation('WPS482')  # via MCP
  Forbid lazy imports. It is an overly complicated feature ...

/wps agent skill

A reusable skill for coding agents (Claude Code, Codex, Cursor and friends)
that teaches them the write-fix-lint-repeat loop:
run flake8 --select=WPS,E999, fix the code (not the config!),
and only # noqa when a human says so (#3773).

The skill lives in .agents/skills/wps.md — drop it into your repo
or use context7 and your agent writes WPS-clean Python from the start.

Features

python3.15 official support (#3758)

Including rules for brand-new syntax:

  • WPS482: forbid lazy imports (#3639). Emitted on python3.15+ only.
    Returning an object from a function does exactly the same thing:

    # Wrong:
    lazy import json
    
    # Correct:
    def load_config():
        import json
        ...
  • WPS483: forbid MappingProxyType on python3.15+ (#3762).
    MappingProxyType does not copy the underlying dict — it can still
    be mutated through the original reference. frozendict is a real
    immutable mapping:

    # Wrong:
    my_dict = MappingProxyType({'a': 1})
    
    # Correct:
    my_dict = frozendict({'a': 1})

t-string support (#3702)

All f-string rules are extended to PEP 750 template strings,
including WPS237 (too complex format specifiers),
WPS479 (multiline), and WPS480 (comments inside):

# Wrong:
template = t'{
    user.name  # comment inside a formatted string
}'

What's Changed

AI features

wemake-python-styleguide is crazy good at improving the agents' code quality.
Use it in your workflows to make the final code simpler and more readable.

  • Adds an optional MCP server for violation explanations, #3770
  • Adds /wps skill for agents, #3773

Features

  • Adds python3.15 official support, #3758
  • Adds support for t strings, it now follows
    the same rules as f string everywhere, #3702
  • Adds WPS482: forbid lazy imports, #3639
  • Adds WPS483: forbid MappingProxyType on python3.15+, #3762

Bugfixes

  • Fixes missing violations in llms-full.txt

Misc

  • Improves WPS365 docs, #3776
  • Improves wps explain FOO error message, when FOO is not found, #3775

New Contributors

Full Changelog: 1.7.1...1.8.0

Don't miss a new wemake-python-styleguide release

NewReleases is sending notifications on new releases.