Wemake

Latest version: v0.1.0

Safety actively analyzes 613460 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 8

0.14.0

Features

- Extracts new violation - WPS450 from WPS436 1118
- Adds domain names options, that are used to create variable names' blacklist 1106

Bugfixes

- Remove ImplicitTernaryViolation - WPS332 1099

Misc

- Adds `local-partial-types` to mypy config
- Uses `abc` stdlib's module to mark abstract base classes 1122

0.13.4

This is the last `0.13.x` supporting release,
we have to concentrate on `python3.8` support
and `0.14.0` which will introduce it to the public.

Bugfixes

- Fix false positive ImplicitYieldFromViolation for async functions 1057
- Fixes nested-classes-whitelist option default value for flake8 prior 3.7.8 1093
- Improve boolean non-keyword arguments validation 1114

Misc

- Updates `flake8-pep3101`
- Updates `flake8-builtins`
- Updates `flake8-eradicate`
- Several small refactoring sessions
- Adds `hypothesis`-based tests
- Adds `flakehell` base config
- Fixes `flakehell` docs
- Fixes `MAX_NOQA_COMMENTS` and related violation docs
- Fixes `OverusedExpressionViolation` and `TooManyExpressionsViolation` docs

0.13.3

Misc

- Updates `radon` version
- Updates `poetry` version to `1.0`

0.13.2

Bugfixes

- Fixes that Github Action was failing for wrong status code
- Fixes `NegatedConditionsViolation` false positive on absent
`else` in combination with `elif`
- Fixes `WPS528` false positive on augmented assigns
- Fixes incorrect message for `WPS349`
- Fixes that `reviewdog` was not able to create more than `30` comments per PR

Misc

- `pylint` docs fixed
- Fixes docs about implicit `yield` violation

0.13.1

Bufixes

- Fixes that `_` was marked as invalid by `VagueImportViolation`
- Fixes that docs for `VagueImportViolation` were misleading
- Fixes invalid docs for `BracketBlankLineViolation` 1020
- Add more complex example to `ParametersIndentationViolation` 1021

Misc

- Now our GitHub Action can be used to leave PR review comments

0.13.0

This is a huge release that was created during the Hactoberfest season.
It was impossible without the huge help from [our awesome contributors](https://github.com/wemake-services/wemake-python-styleguide/graphs/contributors?from=2019-06-01&to=2019-11-18&type=c). Thanks a lot to everyone!

This release is not focused on any particular area.
It features a lot of new rules from different categories.

Features

- Adds cognitive complexity metric, introduced by [`cognitive_complexity`](https://github.com/Melevir/cognitive_complexity)
- Adds docstrings linter [`darglint`](https://github.com/terrencepreilly/darglint)
- Updates `pep8-naming` and `flake8-comprehensions`
- `WPS431` now allow customize whitelist via `nested-classes-whitelist` setting
- Forbids to have invalid strings in stared expressions like `**{'': 1}`
- Forbids to use implicit primitive values in a form of `lambda: 0`
- Forbids to use approximate math constants
- Forbids to redefine string constants
- Forbids use of vague import names (e.g. `from json import loads`)
- Makes `OveruseOfNoqaCommentViolation` configurable via `--max-noqa-comments`
- Forbid incorrectly swapped variables
- Forbids to use redundant subscripts (e.g., `[0:7]` or `[3:None]`)
- Allows `super()` as a valid overused expression
- Forbids to use `super()` with other methods and properties
- `WPS350` enforces using augmented assign pattern
- Forbids unnecessary literals
- `WPS525` forbids comparisons where `in` is compared with single item container
- Forbids wrong annotations in assignment
- Forbids using multiline `for` and `while` statements
- `WPS113` now can be tweaked with `I_CONTROL_CODE` setting
- Adds `WPS000` that indicates internal errors
- Forbids to use implicit `yield from`
- Forbids to start lines with `.`
- Enforces better `&`, `|`, `>>`, `<<`, `^` operators usage
- Forbids incorrect exception order
- Enforces tuples usage with frozenset constructor
- Changes how `WPS444` works, now we use stricter logic for `while` and `assert`
- Forbids to use `yield from` with incorrect types
- Forbids to use consecutive `yield` expressions
- Enforces to use `.items()` in loops
- Enforces using `.get()` over `key in dict` checks
- Forbids to use and declare `float` keys in arrays and dictionaries
- Forbids to use `a[len(a) - 1]` because it is just `a[-1]`
- Forbids too long call chains like `foo(a)(b)(c)(d)`

Bugfixes

- Fixes `ImplicitElifViolation` false positives on a specific edge cases
- Fixes `--i-control-code` setting for `BadMagicModuleFunctionViolation`
- Fixes compatibility with flake8 `3.8.x`
- Fixes that `not not True` was not detected as `WPS330`
- Fixes addition of `MisrefactoredAssignmentViolation` check
- Fixes `WrongMagicCommentViolation` not catching certain wrong comments
- Fixes `BadMagicModuleFunctionViolation` false positives on class-level methods
- Fixes `InconsistentReturnViolation` false positives on nested functions
- Fixes that `--i-dont-control-code` was not present in command line options
- Fixes `BlockVariableVisitor` false positives on a properties
- Fixes that `//` was not recognised as a math operation
- Fixes false positive `BlockAndLocalOverlapViolation` on annotations without value assign
- Fixes bug when `x and not x` was not detected as the similar conditions by `WPS408`
- Fixed that `1.0` and `0.1` were treated as magic numbers

Misc

- Improves Github Action stability
- Replace `scripts/tokens.py` and `scripts/parse.py` with external tools
- Improves violation code testing
- Improves testing of `.. versionchanged` and `previous_codes` properties
- Reference `isort` settings requirement for compliance with `WSP318` in docstring
- Improves tests: we now ensure that each violation with previous codes also
has corresponding versions changed in their documentation

Page 1 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.