{"id":8775,"library":"wemake-python-styleguide","title":"wemake-python-styleguide","description":"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.","status":"active","version":"1.6.1","language":"python","source_language":"en","source_url":"https://github.com/wemake-services/wemake-python-styleguide","tags":["linter","styleguide","flake8","ruff","code quality","opinionated"],"install":[{"cmd":"pip install wemake-python-styleguide","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"wemake-python-styleguide is a plugin for flake8 and requires it to run its checks.","package":"flake8"},{"reason":"As 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.","package":"ruff","optional":true},{"reason":"Required Python interpreter version range.","package":"python","version":">=3.10, <4.0","optional":false}],"imports":[{"note":"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.","symbol":"CLI tool","correct":"wps explain <code>"},{"note":"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.","wrong":"import wemake_python_styleguide","symbol":"flake8 integration","correct":"flake8 --select=WPS ."}],"quickstart":{"code":"pip install wemake-python-styleguide flake8 ruff\n\n# --- pyproject.toml ---\n# [tool.ruff]\n# line-length = 88 # Or your preferred length\n# target-version = \"py310\"\n#\n# [tool.flake8]\n# select = \"WPS\"\n# max-complexity = 10\n# max-line-length = 88\n\n# Run ruff first for formatting and many common lints\nruff format .\nruff check .\n\n# Then run wemake-python-styleguide specific checks via flake8\nflake8 --select=WPS .","lang":"bash","description":"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."},"warnings":[{"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.","message":"Version 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.","severity":"breaking","affected_versions":">=1.0.0"},{"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.","message":"wemake-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`.","severity":"gotcha","affected_versions":"All"},{"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.","message":"The 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.","severity":"gotcha","affected_versions":">=1.0.0"},{"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.","message":"Many 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.","severity":"deprecated","affected_versions":">=1.0.0"},{"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.","message":"The 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.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"search_vec":"'1.6.1':59 '3.10':63 'act':17 'activ':50 'aim':28 'check':41 'code':36,70 'companion':24 'complex':35 'consist':31 'current':56 'enforc':30 'extens':44 'extrem':11 'flake8':20,68 'frequent':53 'less':34 'librari':48 'linter':16,66 'maintain':32,51 'minor':54 'newer':65 'often':37 'opinion':14,72 'pep8':40 'plugin':21 'python':3,7,15,62 'qualiti':71 'releas':55 'ruff':26,69 'rule':45 'set':46 'standard':39 'strict':12 'styleguid':4,8,67 'support':61 'surpass':38 'version':58 'wemak':2,6 'wemake-python-styleguid':1,5","created_at":"2026-04-16T17:03:55.810628+00:00","updated_at":"2026-04-16T17:03:55.810628+00:00","problems":{"verify_error":"no import statement found"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.6.2","cli_name":"","cli_version":null,"type":"library","homepage":"https://wemake-python-styleguide.rtfd.io","github":"https://github.com/wemake-services/wemake-python-styleguide","docs":null,"changelog":null,"pypi":"https://pypi.org/project/wemake-python-styleguide/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"skip","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-05","install_tag":null}}