Skip to content

Version 0.19.0

Compare
Choose a tag to compare
@sobolevn sobolevn released this 25 Mar 20:41
· 31 commits to master since this release
55d110b

This minor version will be the last release with all the flake8 plugins.
In the future this project will be migrated to be used together with ruff.

Features

  • Adds official python3.12 support
  • Breaking: drops python3.8 support
  • Breaking: Reconsider object required base class exception:
    since class Klass[_Type] must not contain object,
    this rule is change to be the opposite:
    object explicit base class must not be used.
    You can use ruff to change all object-based types to the new style:
    ruff check --select=UP004 --fix .
    https://docs.astral.sh/ruff/rules/useless-object-inheritance/
  • Breaking: allow positional-only parameters,
    since it is required by mypy when using Concatenate
  • Adds support for naming rules for PEP695 type params
  • Due to how f-string are parsed in python3.12 several token-based
    violations are not reported anymore for them:
    WrongMultilineStringViolation, ImplicitRawStringViolation,
    WrongUnicodeEscapeViolation, RawStringNotNeededViolation
  • wemake output formatter now respects NO_COLOR=1 option
    to disable text highlighting. See https://no-color.org
  • Adds ImportObjectCollisionViolation to detect
    the same objects imported under different aliases
  • Adds reveal_locals to the list of forbidden functions
  • Updates flake8 to 7.x

Bugfixes

  • Fixes ForbiddenInlineIgnoreViolation config parsing. #2590
  • Fixes WrongEmptyLinesCountViolation for func definitions with ellipsis. #2847
  • Fixes WrongEmptyLinesCountViolation for multiline implicit string concatination. #2787
  • Fixes ObjectInBaseClassesListViolation, UnpythonicGetterSetterViolation,
    ImplicitInConditionViolation, RedundantSubscriptViolation,
    TooLongCompareViolation to include better error details
  • Fixes TooDeepNestingViolation for TryStar and Match statements
  • Fixes TooLongTryBodyViolation and TooManyExceptCasesViolation
    to work for TryStar statements as well
  • Fixes UselessNodeViolation to work with TryStar
  • Fixes DuplicateExceptionViolation to work with TryStar
  • Fixes TryExceptMultipleReturnPathViolation to work with TryStar
  • Fixes IncorrectExceptOrderViolation to work with TryStar
  • Fixes that MatchStar was not checked in pattern matching name assignments
  • Fixes pattern matching support
    in BlockAndLocalOverlapViolation and OuterScopeShadowingViolation

Misc

  • Updates multipleflake8-* dependencies
  • Fixes multiple typos in docs