wemake-python-styleguide
wemake-python-styleguide copied to clipboard
The strictest and most opinionated python linter ever!
### What's wrong poetry add --group=dev wemake-python-styleguide Using version ^0.18.0 for wemake-python-styleguide Updating dependencies Resolving dependencies... (3.4s) Because no versions of wemake-python-styleguide match >0.18.0,5), wemake-python-styleguide (>=0.18.0,5). And because flakeheaven (3.3.0)...
# Rule request "WPS600 Forbid subclassing lowercase builtins" should allow the following ```python class PizzaToppings(str, Enum): MARGHERITA = "MARGHERITA" MARINARA = "MARINARA" ``` ## Thesis Enums are a bit akwkard...
### What's wrong The following is not allowed by WPS356: ```python from typing import Generic, Self, Tuple, TypeVar, TypeVarTuple DType = TypeVar('DType') Shape = TypeVarTuple('Shape') class Array(Generic[DType, *Shape]): ... def...
# Rule request: Restrict usage of coroutines (initialized, but not awaited) as boolean conditions ## Thesis Example: ```python async def some_coro() -> bool: return True if some_coro(): # The rule...
Bumps [m2r2](https://github.com/crossnox/m2r2) from 0.3.2 to 0.3.3.post2. Changelog Sourced from m2r2's changelog. Version 0.3.3 (2022-08-11) Drop support for all python versions prior to 3.7 Upgrade to docutils 0.19 Commits 004a3e7 update...
From: WPS420 — Forbid some python keywords. > pass keyword is just useless by design. There’s no use-case for it. Because it does literally nothing. This is a snippet from...
### What's wrong I have a Django app and in `settings.py` I configure logging like this: ```python LOGGING = { // some settings "formatters": { "app": { "format": ( "%(asctime)s...
### What's wrong The "magic number" entry is to flag numbers that don't have an associated context / semantic meaning. I think keyword arguments are sufficiently semantic. ```python #!/usr/bin/python3 import...
### What's wrong Code like this seems to trigger a violation: ``` if not this(): ... elif not that(): ... else: ... ``` ### How it should be No violation....
# I have made things! ## Checklist - [x] I have double checked that there are no unrelated changes in this pull request (old patches, accidental config files, etc) -...