wemake-python-styleguide
wemake-python-styleguide copied to clipboard
The strictest and most opinionated python linter ever!
I'm getting `WPS436 Found protected module import: _localdev` when importing a module in my own project. I'm not sure if I'm just missing a config option that wemake uses, or...
With code like: ``` for widget in self._widgets: await widget.update() ... for widget in self._widgets: await widget.set_something(state) ``` I get WPS440 and WPS441 due to reusing the widget variable name...
# Bug report This code ```python import pathlib path = pathlib.Path('.') path.chmod(0o700) ``` causes ```console WPS432: Found magic number: 448 ``` It's unobvious that it's the same number and it's...
# Bug report ## What's wrong When having compat shims, this happens: ```python # _compat.py: try: from subprocess import CompletedProcess # noqa: S404, WPS433 except ImportError: class CompletedProcess: ... ```...
# Rule request ## Thesis I often see that some people use this naming pattern: ```python x1 = 1 x2 = 2 ``` Which is perfectly fine. But, this one...
# Rule request ## Thesis This code contains two types of similar but different arguments: ```python def first(first: int = 0, *, second: int): ... def second(first: int = 0,...
It should show: 1. Current plugin code with `WPS` prefix, so it would be easier to search 2. Code changes in history: we have `previous_codes` property for this Example: https://github.com/sixty-north/added-value
# Rule request ## Thesis There are several cases when brackets for a tuple can be really important: 1. Single element tuples: `x,` vs `(x,)` the second one is easier...
For large project linting can be really slow! We need to use cache for excluding already checked unchecked files. Original idea: https://gitlab.com/pycqa/flake8/-/issues/601
Currently, we have a lot of rules that are not very aligned with `.pyi` files. Here are some of them: - `...` usage as a placeholder - complexity rules like...