Wemake

Latest version: v0.1.0

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

Scan your dependencies

Page 3 of 8

0.11.1

Bugfixes

- Now using `pygments` as a direct dependency

0.11.0

We had a really big problem: all violations inside `best_practices`
was messed up together with no clear structure.

We had to fix it before it is too late.
So, we broke existing error codes.
And now we can promise not to do it ever again.

We also have this [nice migration guide](https://wemake-python-stylegui.de/en/latest/pages/changelog/migration_to_0_11.html)
for you to rename your violations with a script.

Features

- **Breaking**: replaces `Z` error code to `WPS` code
- **Breaking**: creates new violation group `refactoring.py`
- **Breaking**: creates new violation group `oop.py`
- **Breaking**: moving a lot of violations
from `best_practices` to `refactoring`, `oop`, and `consistency`
- Adds new `wemake` formatter (using it now by default)

Bugfixes

- Fixes error message of `OverusedStringViolation` for empty strings
- Now does not count string annotations as strings for `OverusedStringViolation`
- Fixes `InconsistentReturnVariableViolation` was raised twice

Misc

- Adds migration guide to `0.11`
- Improves legacy guide
- Adds `--show-source` to the default recommended configuration
- Adds better docs about auto-formatters
- Adds `autopep8` to CI to make sure that `wps` is compatible with it
- Ensures that `--diff` mode works for `flake8`
- Renames `Incorrect` to `Wrong` where possible
- Renames `IncorrectlyNestedTernaryViolation` to `NestedTernaryViolation`
- Renames `IncorectLoopIterTypeViolation` to `WrongLoopIterTypeViolation`

0.10.0

This release is mostly targeted at writing better compares and conditions.
We introduce a lot of new rules related to this topic improving:
consistency, complexity, and general feel from your code.

In this release we have ported a lot of existing `pylint` rules,
big cudos to the developers of this wonderful tool.

Features

- Adds `flake8-executable` as a dependency
- Adds `flake8-rst-docstrings` as a dependency
- Validates options that are passed with `flake8`
- Forbids to use module level mutable constants
- Forbids to over-use strings
- Forbids to use `breakpoint` function
- Limits yield tuple lengths
- Forbids to have too many `await` statements
- Forbids to subclass lowercase `builtins`
- Forbids to have useless `lambda`s
- Forbids to use `len(sized) > 0` and `if len(sized)` style checks
- Forbids to use repeatable conditions: `flag or flag`
- Forbids to write conditions like `not some > 1`
- Forbids to use heterogenous compares like `x == x > 0`
- Forbids to use complex compare with several items (`>= 3`)
- Forbids to have class variables that are shadowed by instance variables
- Forbids to use ternary expressions inside `if` conditions
- Forces to use ternary instead of `... and ... or ...` expression
- Forces to use `c < b < a` instead of `a > b and b > c`
- Forces to use `c < b < a` instead of `a > b > c`
- Forbids to use explicit `in []` and `in ()`, use sets or variables instead
- Forces to write `isinstance(some, (A, B))`
instead of `isinstance(some, A) or isinstance(some, B)`
- Forbids to use `isinstance(some (A,))`
- Forces to merge `a == b or a == c` into `a in {b, c}` and
to merge `a != b and a != c` into `a not in {b, c}`

Bugfixes

- Fixes incorrect line number for `Z331`
- Fixes that `Z311` was not raising for multiple `not in` cases
- Fixes a bunch of bugs for rules working with `Assign` and not `AnnAssign`
- Fixes that `continue` was not triggering `UselessReturningElseViolation`

Misc

- Renames `logics/` to `logic/` since it is grammatically correct
- Renames `Redundant` to `Useless`
- Renames `Comparison` to `Compare`
- Renames `WrongConditionalViolation` to `ConstantConditionViolation`
- Renames `ComplexDefaultValuesViolation` to `ComplexDefaultValueViolation`
- Refactors `UselessOperatorsVisitor`
- Adds `compat/` package, getting ready for `python3.8`
- Adds `Makefile`
- A lot of minor dependency updates

0.9.1

Bugfixes

- Fixes issue with `pydocstyle>=4` by glueing its version to `pydocstyle<4`

0.9.0

This is mostly a supporting release with several new features
and lots of bug fixes.

Features

- Forbids to use magic module methods `__getattr__` and `__dir__`
- Forbids to use multiline conditions
- Forbids local variables that are only used in `return` statements

Bugfixes

- Fixes module names for modules like `io.py`
- Fixes false positive `Z310` for numbers like `0xE`
- Fixes false positive for compare ordering with `await`
- Fixes problem with missing `_allowed_left_nodes`
- Fixes problem false positive for `Z121` when using `_` for unused var names
- Fixes false positive for negative number in default values
- Fixes error text for `ComplexDefaultValueViolation`
- Fixes problem with false positive for `Z459`
when a default value is an `Ellipsis`

Misc

- Adds `py.typed` file in case someone will import our code,
now it will have types
- Adds several missing `final` decorators
- Enforces typing support
- Refactors how `typing_extensions` package is used
- Adds docs about `black`
- Adds big "Star" button
- Multiple dependencies update
- Better `exclude` rule for `flake8` check
- Removed warnings from `pytest`

0.8.1

Bugfixes

- Fixes how `wps_context` is calculated, so `super()` calls are now working

Page 3 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.