Releases: wemake-services/wemake-python-styleguide
Releases · wemake-services/wemake-python-styleguide
Version 0.6.1
Bugfixes
- Fixes a conflict between our plugin and
pyflakes
Version 0.6.0
Features
- Adds
flake8-per-file-ignoredependency - Adds default values to the
flake8 --helpoutput - Adds
doas a restricted variable name - Forbids multiple assignment targets for context managers
- Forbids to use incorrect multi-line parameters
- Forbids to use
boolvalues as positional arguments - Forbids to use extra indentation
- Forbids to use inconsistent brackets
- Forbids to use multi-line function type annotations
- Forbids to use uppercase string modifiers
- Forbids to use assign chains: now we only can use one assign per line
- Forbids to use assign with unpacking for any nodes except
Name - Forbids to have duplicate
exceptblocks
Bugfixes
- Fixes tests failing on windows (@sobolevn hates windows!),
but it still fails sometimes - Fixes bug when
@staticmethodwas treated as a module member - Fixes bug when some nodes were not checked with
TooDeepNestingViolation - Fixes bug when it was possible to provide non-unique aliases
- Fixes incorrect line number for incorrect parameter names
- Fixes bug when names like
__some__value__were not treated as underscored - Fixes bug when assignment to anything rather than name was raising an error
Misc
- Refactoring: now we fix
asyncnodes offset in a special transformation - Improves docs: specifies what
transformationis - Improves docs: making contributing section in the
READMEmore friendly - Improves build: changes how CI installs
poetry
Version 0.5.1
Bugfixes
- Fixes all possible errors that happen
because of unsetparentandfunction_typeproperties
Version 0.5.0
Features
- Breaking: removes
--max-conditionsand--max-elifsoptions - Breaking: removes
--max-offset-blocks - Breaking: changes default
TooManyConditionsViolationthreshold from3to4 - Breaking: changes
TooManyBaseClassesViolationcode from225to215 - Forbids to use
lambdainside loops - Forbids to use
self,cls, andmcsexcept for first arguments only - Forbids to use too many decorators
- Forbids to have unreachable code
- Forbids to have statements that have no effect
- Forbids to have too long names for modules and variables
- Forbids to have names with unicode for modules and variables
- Add
variableto the blacklisted names - Now
RedundantLoopElseViolationalso checkswhileloops
Bugfixes
- Fixes
TooManyConditionsViolationto work with any conditions, not justifs - Fixes
TooManyConditionsViolationthat did not count conditions correctly - Fixes
TooManyForsInComprehensionViolationto find all comprehension types - Fixes
TooManyElifsViolationto check module level conditions - Fixes
TooManyBaseClassesViolationdocs location - Fixes
WrongVariableNameViolationnot checkinglambdaargument names - Fixes
OffsetVisitorincorrectawaithandling
Misc
- Refactoring: moves all complexity checks into
complexity/folder - Refactoring: improves how different keyword visitors are coupled
- Improves docs: we have removed magic comments and code duplication
- Improves docs: now
_pages/is named justpages/ - Improves docs: now all violations are sorted correctly
- Improves tests: now testing different keywords separately
- Improves tests: now all violations must be contained in
test_noqa.py - Improves tests: now we also run
compile()on allastexamples - Improves tests: now we are sure about correct order of violations
Version 0.4.0
Development was focused around better test coverage and providing a better API
for tests. We also now covering more cases and testing violation texts.
Features
- Breaking: removes duplicating module name rules, now we use the same rules
for both variables and modules - Breaking: removes
--min-module-name-lengthoptions - Breaking: renames
--min-variable-name-lengthinto--min-name-length - Dependencies: updates
flake8version to3.6 - Dependencies: removes
pycodestylepinned version
Bugfixes
- Multiple fixes to error text formats to be more readable
- Fixes
UNDERSCORED_NUMBER_PATTERNto match names likecome_22_me - Fixes
UpperCaseAttributeViolationnot being displayed in the docs - Fixes consistency checks being duplicated in the docs
- Fixes
UnderscoredNumberNameViolationshowing incorrect line number - Fixes
ProtectedAttributeViolationto respectsuper()andmcs - Fixes
ProtectedAttributeViolationto show correct text - Fixes
BadNumberSuffixViolationto show correct text - Fixes
TooManyBaseClassesViolationto show correct text - Fixes
TooManyElifsViolationto show correct text - Fixes
TooDeepNestingViolationto show correct text - Fixes
TooManyMethodsViolationto show correct text - Fixes
ReassigningVariableToItselfViolationto show correct text - Renames
UnderscoredNumberNameViolationtoUnderscoredNumberNameViolation
Misc
- Refactoring: removed duplicate logic inside
logics/filenames.py - Improves tests: now testing almost all violations inside
noqa.py - Improves tests: now testing violations text
- Improves tests: now all common patters live in related
conftest.py - Improves docs: now all configuration options are listed in the violations
Version 0.3.0 aka The Hacktoberfest Feast
This release was made possible by awesome people who contributed
to the project during #hactoberfest. List of awesome people:
- @novikovfred
- @riyasyash
- @sathwikmatsa
- @tipabu
- @roxe322
- @geoc0ld
- @lensvol
- @SheldonNunes
- @tommbee
- @valignatev
- @vsmaxim
Features
- Adds
flake8-printas a dependency - Adds
typing-extensionsas a dependency - Forbids to use
quitandexitfunctions - Forbids the comparison of two literals
- Forbids the incorrect order comparison, enforcing variable to come first
- Forbids underscores before numbers in names
- Forbids class level attributes whose name is not in
snake_case - Forbids comparison of the same variables
- Forbids inconsistent octal, binary, and hex numbers
- Forbids too many arguments in
lambdafunctions - Forbids extra
objectin parent classes list - Forbids
forloops with unusedelse - Forbids variables self reassignment
- Forbids
trywithfinallywithoutexcept - Forbids
ifstatements with invalid conditionals - Forbids opening parenthesis from following keyword without space in between them
- Forbids the use of more than 2
forloops within a comprehension - Forbids variable names with more than one consecutive underscore
- Restricts the maximum number of base classes aka mixins
- Forbids importing protected names
- Forbids using protected methods and attributes
- Forbids
yieldinside__init__method
Bugfixes
- Fixes that
MultipleIfsInComprehensionViolationwas not enabled - Fixes flaky behaviour of
test_module_namestest package - Fixed
TooManyMethodsViolationnot displaying line number in output - Fixed
OffsetVisitordue to python bug
Misc
- Updates
poetryversion - Refactoring: some general changes, including better names and APIs
- Improves docs: now we have
versionaddedfor each violation - Improves docs: now we explicitly state how some violations might be ignored
- Improves tests: now we are testing options
- Improves tests: now we have different
tests/folder structure - Improves tests: now we are testing presets
- Improves tests: now we are using different logic inside
assert_errors - Improves tests: now testing magic numbers in more situations
- Improves tests: now testing more situations with empty base classes
- Improves tests: now testing presets, that they have all the existing visitors
- Improves tests: now using stricter
noqachecks - Improves tests: now testing that any name is allowed when using a variable
- Improves types: now all class attributes are marked as
ClassVar - Improves types: now we use
finalto indicate what should not be changed - Improves types: now we do not have any ugly import hacks
Version 0.2.0
This release was made possible by awesome people who contributed
to the project during #hactoberfest. List of awesome people:
Features
- Now we are counting
asyncfunction as a module member - We now forbid to use
credits()builtin function - We now check
async forandasync withnesting level - We now check
async forandasync withvariable names - We now count
asyncmethods as method for classes complexity check - We now count
asyncfunctions as functions for module complexity check - We now check
asyncfunctions names and arguments - We now count
asyncfunctions complexity - We now ignore
asyncfunctions in jones complexity check - We now check for nested
asyncfunctions - We now check for
asyncfunctions with@staticmethoddecorator
Misc
- Improves docs: add
usage.rst - Improves docs: adds naming convention to the
naming.py - Improves docs: multiple typos, bugs, and issues fixes
- Improves tests: now we are testing
asynccomprehensions
Version 0.1.0
Features
- Breaking: changes violation codes, now they are grouped by meaning
Misc
- Refactoring: changes how visitors are organized inside the package
- Improves docs: now we have a glossary
- Refactoring: refactoring terms that violate our glossary
- Improves docs: now all error files contain fancy documentation and summary
- Improves docs: now we have added API reference to the docs
- Improves docs: adds new plugin development guide
Version 0.0.16
Features
- Adds
flake8-logging-formatdependency - Adds
flake8-type-annotationsdependency - Adds
flake8-breaking-linedependency - Removes
flake8-super-calldependency - Adds
PartialFloatViolation - Adds
MagicNumberViolation - Adds
WrongDocCommentViolation - Adds
MAGIC_NUMBERS_WHITELISTconstant - Changes what variable names are blacklisted, adds
false,true, andno
Misc
- Improves docs: now including docs for
--max-conditionoption - Improves docs: adds some new
Zen of Pythonreferences - Improves tests: adds many new examples
- Improves docs: now each error has its error message displayed in the docs
- Improves docs: readme is now ready for the release
- Improves docs: now error pages are split
- Improves docs: now all
flake8plugin dependencies are documented
Version 0.0.15
Features
- Adds
MultipleIfsInComprehensionViolation - Adds
TooManyConditionsViolation - Adds
--max-conditionsoption
Misc
- Improves
CONTRIBUTING.md - Moves issues templates to
.github/folder