0.13.0 aka The Lintoberfest

Published on November 20, 2019 by Nikita Sobolev

This is a huge release that was created during the Hactoberfest season. It would have been impossible without the huge help from our awesome contributors. 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
  • Adds docstrings linter 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

Full changelog: https://github.com/wemake-services/wemake-python-styleguide/releases/tag/0.13.0