All Versions
56
Latest Version
Avg Release Cycle
27 days
Latest Release
-
Changelog History
Page 1
Changelog History
Page 1
-
v0.17.1 Changes
๐ Features
- Adds
__init_subclass__
in the beginning of accepted methods order as per WPS338
- Adds
-
v0.16.2 Changes
Misc
- โ Adds full violation codes to docs and
BaseViolation.full_code
#2409
- โ Adds full violation codes to docs and
-
v0.16.1 Changes
๐ Bugfixes
- ๐ Fixes crash on
'Literal["raise"]'
annotation #2341 - ๐ Fixes
WPS471
was not detected on complex assignment targets #2301 - ๐ Fixes
flake8-bandit
andbandit
version conflict #2368
- ๐ Fixes crash on
-
v0.16.0 Changes
๐ Features
- Forbids using non-trivial expressions as an argument to
except
- Forbids using too many variables in a tuple unpacking
- Forbids using
float("NaN")
. - Allow
__call__
method to be asynchronous - ๐ Allows common strings not to be counted against string constant overuse limit
๐ Bugfixes
- ๐ Fixes fails of annotation complexity on
Literal[""]
.
Misc
- Introduce helper script to check for missing calls to
self.generic_visit(node)
in AST visitors - โก๏ธ Updates
poetry
version to1.1
- Forbids using non-trivial expressions as an argument to
-
v0.15.3 Changes
๐ Bugfixes
- ๐ Fixes crash on
python3.10
- ๐ Fixes
UselessReturningElseViolation
to not reportelse
withbreak
#1958 - ๐ Fixes
ReassigningVariableToItselfViolation
to not report onx = (x,)
#1807 - ๐ Fixes
ReassigningVariableToItselfViolation
to extract variables from unary operators #1874 - ๐ Fixes that
f'{some:,}'
was considered too complex #1921 - ๐ Fixes that
range(len(x))
was not allowed even outsidefor
loops #1883 - ๐ Fixes
UselessReturningElseViolation
to not reportelse
withbreak
#2187 (even if we haveexcept
in loop) - ๐ Fixes fixture in
UselessReturningElseViolation
#2191
Misc
- โ Adds documentation (and tests) for how to run project on Jupyter Notebooks
- โก๏ธ Updates
mypy
to0.902
and fixes type issues
- ๐ Fixes crash on
-
v0.15.2 Changes
๐ Bugfixes
- ๐ Fixes
BitwiseAndBooleanMixupViolation
work with PEP 604 union types #1884 - ๐ Fixes
CognitiveModuleComplexityViolation
to not trigger for a single-item modules - ๐ Fixes that
ConstantConditionViolation
was not reported for aBoolOp
- Functions and methods marked as
@overload
or@typing.overload
do not count in complexity rules
Misc
- โก๏ธ Updates GitHub Action's base Python image version to
3.8.8
๐ Features
- โ Adds a math operations evaluator to improve and allow several violation checks.
- ๐ Fixes
-
v0.15.1 Changes
๐ Bugfixes
- ๐ Fixes
dataclasses
import, it was failing onpython3.6
- ๐ Fixes
InconsistentComprehensionViolation
work withasync
comprehensions - ๐ Fixes nested comprehensions support for
InconsistentComprehensionViolation
- ๐ Fixes multiple
if
support forInconsistentComprehensionViolation
- ๐ Fixes that
NestedTernaryViolation
was not reported for a comprehension - ๐ Fixes that
ConstantConditionViolation
was not reported for a comprehension - ๐ Fixes that
ConstantConditionViolation
was triggering forwhile x := True:
- ๐ Fixes that
UselessElseViolation
was not reported forfor
,while
, andtry
keywords - ๐ Fixes false positive
InfiniteWhileLoopViolation
fortry
#1857 - ๐ Fixes that
InfiniteWhileLoopViolation
was not triggered on1
or other truthy nodes
Misc
- ๐จ Refactors how
tokenize
tests are executed, now we have an option to compile fixture code to make sure it is syntactically valid.
- ๐ Fixes
-
v0.15.0 Changes
๐ Features
- โ Adds
python3.9
support - ๐
Forbids to use new-style decorators on
python3.9
- ๐ Changes how we treat own/foreign attributes,
since now we only check assigned attribute names for
self
/cls
/mcs
, but not any other ones. So, now writtingpoint.x = 1
will not trigger any violations. Previously, it would raise "too short name". - Forbids using non-trivial expressions as an argument to
except
- Forbids using too many variables in a tuple unpacking
- Forbids using
float("NaN")
. - Forbids assigning to a slice
- Allow
__call__
method to be asynchronous - ๐ Allows common strings not to be counted against string constant overuse limit
- Forbids to unpack iterable objects to lists #1259
- Forbids to use single
return None
- Add
__await__
to the list of priority magic methods - Forbids to use float zeros (
0.0
) - ๐ Forbids
raise Exception
andraise BaseException
- Forbids to use
%
with zero as the divisor - โ Forbids testing conditions to just return booleans when it is possible to simply return the condition itself
- Forbids to use unsafe infinite loops
- Forbids to use raw strings
r''
when not necessary - Forbids to use too complex
f
-strings - Forbids to use too many
raise
statements inside a single function - Forbids to compare with
float
andcomplex
values - Forbids single element destruct
- ๐ง Forbids to ignore some violations (configurable) on a line level
- Forbids single element unpacking
- Forbids to unpack lists with side-effects
- ๐ Forbids to use miltiline strings except for assignments and docstrings
- Forbids not returning anything in functions and methods starting with
get_
- Forbids to use empty comment
- Forbids using bitwise operation with boolean operation
- Forbids inconsistent structuring of multiline comprehensions
- Forbids to use unpythonic getters and setters such as
get_attribute
orset_attribute
- ๐ Now
credits
,license
, andcopyright
builtins are free to shadow
๐ Bugfixes
- ๐ Fixes fails of annotation complexity on
Literal[""]
- ๐ Fixes how wrong variable names were checked case sensitive with
WPS110
- Fixes false positives DirectMagicAttributeAccessViolation with
__mro__
,__subclasses__
and__version__
- ๐ Make
WPS326
work when there is comment between string literals - ๐ Allowed yield statements in call method
- ๐ Allow to use
^
with1
- ๐ Fixes false positives in WPS513 and WPS323
- ๐ Fixes false positive WPS426 if
lambda
in loop uses only its arguments - ๐ Fixes false negative WPS421 with
pprint.pprint
- ๐ Fixes WPS441 triggering when reusing variable names in multiple loops
- ๐ Fixes false positive ImplicitEnumerateViolation on range with step #1742
- ๐ Allows to use
_
to declare several unused variables, like:x, _, _ = coordinates()
- ๐ Fixes variable reassignment in class context
- ๐ Fixes that
*'abc'
was not counted as pointless star expression - ๐ Fixes that
-some
was counted as overused expression - ๐ Fixes several bugs with attribute names
Misc
- โก๏ธ Updates lots of dependenices
- ๐ Fixed documentation for TooManyPublicAttributesViolation
- โก๏ธ Updated isort config
- Introduce helper script to check
for missing calls to
self.generic_visit(node)
in AST visitors - โก๏ธ Updates
poetry
version to1.1
- โก๏ธ Updates
reviewdog
version to0.11.0
and addsaction-depup
- โ Adds
-
v0.14.1 Changes
July 29, 2020๐ Bugfixes
- ๐ Fixes
[email protected]
compatibility
- ๐ Fixes
-
v0.14.0 Changes
March 22, 2020๐ This release was focused on adding
python3.8
support,
๐ removing dependencies that can be removed, and fixing bugs.There are breaking changes ahead!
We also have this nice migration guide.
One more thing:
flake8
still fails on:=
operator.
And there's nothing we can do about it.
๐ Please, be patient โ this linter does not allow to have:=
in the source code anyway!๐ Features
- ๐ฅ Breaking : removes
flake8-executable
, now usingWPS452
instead ofEXE001..EXE005
- ๐ฅ Breaking : removes
flake8-print
, now usingWPS421
instead ofT001
- ๐ฅ Breaking : removes
flake8-builtins
, now usingWPS125
instead ofA001..A005
- ๐ฅ Breaking : removes
flake8-annotations-complexity
,
now usingWPS234
instead ofTAE002
- ๐ฅ Breaking : removes
flake8-pep3101
, now usingWPS323
instead ofS001
,
we also use a new logic for this violation:
we check string defs for%
patterns, and not for%
operator - ๐ฅ Breaking :
WPS441
is no longer triggered forexcept
blocks,
it is now handled byF821
fromflake8
- ๐ฅ Breaking : removes
radon
,
becausecognitive-complexity
andmccabe
is enough - ๐ฅ Breaking : removes
flake8-loggin-format
as a direct dependency - ๐ฅ Breaking : removes
ImplicitTernaryViolation
orWPS332
,
๐ because it has too many false positives #1099 - โ Removes
flake8-coding
, all encoding strings, visitor and tests
for oldWPS323
which is now reused for modulo formatting checks - โ Adds
python3.8
support - ๐
Changes
styleguide.toml
andflake8.toml
scripts definition - ๐
Extracts new violation -
WPS450
fromWPS436
#1118 - โ Adds domain names options:
--allowed-domain-names
and--forbidden-domain-names
,
๐ that are used to create variable names' blacklist #1106 - ๐
Forbids to use
\r
(carriage return) as line breaks in strings #1111 - Forbids to use
:=
operator, it now reusesWPS332
code - Forbids to use positional only
/
arguments - Forbids to have too many names imported from a single
from ... import
- Forbids to use
continue
andbreak
infinally
- โฌ๏ธ Forbids to use
__reduce__
and__reduce_ex__
magic methods - Adds
__call__
to list of methods that should be on top #1125 - ๐ Allows
_
to be now used as a defined variable - โ Removes
cognitive_complexity
dependency, now it is built in into our linter - โ Adds baseline information for all complexity violation messages:
x > baseline
- ๐ Changes how cognitive complexity is calculated
- โ Adds support for positional arguments in different checks
- โ Adds
UnreadableNameViolation
asWPS124
because there are some
character combination which is not easy to read - โ Adds support for
NamedExpr
with in compare type violation
๐ Bugfixes
- Fixes how
i_control_code
behaves withWPS113
- ๐ Fixes that cognitive complexity was ignoring
ast.Continue
,ast.Break
, andast.Raise
statements - ๐ Fixes that cognitive complexity was ignoring
ast.AsyncFor
loops - ๐ Fixes that annotation complexity was not reported for
async
functions - ๐ Fixes that annotation complexity was not reported for lists
- ๐ Fixes that annotation complexity was not reported for
*
and/
args - ๐ Fixes that annotation complexity was not tested for dot notation attributes
- ๐ Fixes that annotation complexity fails on string expressions
- ๐ Fixes bug when
TooManyPublicAttributesViolation
was counting duplicate fields - ๐ Fixes negated conditions
WPS504
was not reported forif
expressions - ๐ Fixes that
import dumps
was reported asWPS347
,
now onlyfrom ... import dumps
is checked - ๐ Fixes that
from some import a as std
was reported as a vague import
withWPS347
despite having a meaningful alias - ๐ Fixes that
WPS501
was reported for@contextmanager
definition - ๐ Fixes
WPS226
to be thrown at nested string type annotations - ๐ Fixes
WPS204
reported simplest nodes as overused like[]
andcall()
- ๐ Fixes
WPS204
not reporting overusedf
strings - ๐ Fixes
WPS204
reporting overused return type annotations - ๐ Fixes
WPS204
reportingself.
attribute access - ๐ Fixes
WPS331
reporting cases that do require some extra steps before return - ๐ Fixes
WPS612
not reporingsuper()
calls without return - ๐ Fixes
WPS404
not raising on wrong*
and/
defaults - ๐ Fixes
WPS425
raising on.get
,getattr
,setattr
,
and other builtin functions without keyword arguments - ๐ Fixes
WPS221
reporting differently on differentpython
versions - ๐ Fixes
WPS221
reporting nested variable annotations - ๐ Fixes
WPS509
not reporting nested ternary in grandchildren ofif
- ๐ Fixes
WPS509
not reporting nested ternary in ternary - ๐ Fixes
WPS426
not reporting nestedlambda
in comprehensions - ๐ Fixes several violations to reporting for
ast.Bytes
andast.FormattedStr
whereast.Str
was checked - ๐ Fixes
WPS601
reporting shadowing for non-self
attributes - ๐ Fixes
WPS114
not to be so strict - ๐ Fixes
WPS122
not raising forfor
andasync for
definitions - ๐ Fixes
WPS400
raising for# type: ignore[override]
comments - ๐ Fixes
WPS115
not raising for attributes inside other nodes
Misc
- ๐ Changes how tests are executed
- ๐ Changes how coverage is calculated, adds
coverage-conditional-plugin
- โ Adds how a violation can be deprecated
- ๐ Improves old visitor tests with
/
argument cases - ๐ Improves old visitor tests with
:=
cases - โ Adds
local-partial-types
to mypy config - ๐
Uses
abc
stdlib's module to mark abstract base classes #1122 - โ Adds
python3.8
to the CI - โก๏ธ Updates a lot of dependencies
- ๐ฅ Breaking : removes