wemake-python-styleguide
wemake-python-styleguide copied to clipboard
The strictest and most opinionated python linter ever!
### What's wrong When you have a multi-module repo, you might have your Python code located in a subfolder, together with its setup.cfg. Now, you are tempted to use this...
https://github.com/Instagram/Fixit/blob/master/fixit/rules/gather_sequential_await.py
### What's wrong Hi! You have a very good plugin! I fell in love with it at first sight, but your uncooperative approach to https://github.com/wemake-services/wemake-python-styleguide/issues/1321 it's frustrating. I think it...
## What's wrong Right now this code triggers WPS323 violation ([documentation](https://wemake-python-stylegui.de/en/latest/pages/usage/violations/consistency.html#wemake_python_styleguide.violations.consistency.ModuloStringFormatViolation)): ```python import logging logging.info('Hello, %s !', 'World') ``` Running flake8 on this code gives this: ``` flake8 wps323_demo.py wps323_demo.py:1:1:...
# Rule request ## Thesis We should raise a warning when `noqa` comment is unused. However, I am not sure that this is possible without patching `flake8`. ## Reasoning Consider...
### What's wrong Produces error in actions ``` Run wemake-services/[email protected] with: reporter: github-pr-review path: ./src env: pythonLocation: /opt/hostedtoolcache/Python/3.9.13/x64 LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.13/x64/lib GITHUB_TOKEN: *** /usr/bin/docker run --name cd98fe6f4b56db05[2](https://github.com/user/backend/runs/7426747689?check_suite_focus=true#step:5:2)4edd9b7[3](https://github.com/user/backend/runs/7426747689?check_suite_focus=true#step:5:3)a672f703ae26_9e185d --label [4](https://github.com/user/backend/runs/7426747689?check_suite_focus=true#step:5:4)cd98f --workdir /github/workspace...
### What's wrong WPS421 forbids calling some built-in functions, which includes `hasattr()`. ### How it should be The function `hasattr()` should be allowed. There are certain scenarios where using `hasattr()`...
### What's wrong In Python 3.7+ a class `__aiter__` must return an async iterator object (an object that implements `__anext__`). An async generator (an async function with `yield`) is considered...
### What's wrong String usage is detecting strings used inside list of dictionaries as being overused. For example in a django project, the following configuration will trigger the rule violation...
# Rule request ## Thesis Forbid `ast.Is` in `ast.Compare.ops` when it's size is not zero. For example: ``` a = None a is None # True, as expected a is...