All Versions
57
Latest Version
Avg Release Cycle
27 days
Latest Release
-

Changelog History
Page 3

  • v0.12.1 Changes

    August 15, 2019

    ๐Ÿ”‹ Features

    • ๐Ÿ”ง Tweaks nitpick configuration

    ๐Ÿ›  Bugfixes

    • ๐Ÿ’… Changes radon and pydocstyle versions for better resolution
    • ๐Ÿ›  Fixes nitpick urls

    Misc

    • ๐Ÿ‘Œ Improves README.md with flakehell and nitpick mentions
    • ๐Ÿ‘Œ Improves docs all accross the project
  • v0.12.0 Changes

    August 14, 2019

    ๐Ÿš€ In this release we had a little focus on:

    1. Primitives and constants and how to use them
    2. Strings and numbers and how to write them
    3. OOP features
    4. Blocks and code structure,
      including variable scoping and overlaping variables
    5. Overused expressions and new complexity metrics

    ๐Ÿ”‹ Features

    • ๐Ÿ’ฅ Breaking : moves ImplicitInConditionViolation from WPS336 to WPS514
    • ๐Ÿ’ฅ Breaking : now ExplicitStringConcatViolation uses WPS336
    • ๐Ÿ’ฅ Breaking : moves YieldMagicMethodViolation from WPS435 to WPS611
    • โž• Adds xenon as a dependency, it also checks for cyclomatic complexity,
      ๐Ÿ‘ but uses more advanced algorithm with better results
    • Forbids to have modules with too many imported names
      ๐Ÿ”ง configured by --max-imported-names option which is 50 by default
    • Forbids to raise StopIteration inside generators
    • Forbids to have incorrect method order inside classes
    • Forbids to make some magic methods async
    • Forbids to use meaningless zeros in float, binary, octal, hex,
      and expanentional numbers
    • Enforces to use 1e10 instead of 1e+10
    • Enforces to use big letters for hex numbers: 0xAB instead of 0xab
    • Enforces to use r'\n' instead of '\\n'
    • Forbids to have unicode escape characters inside binary strings
    • Forbids to use else if instead of elif
    • Forbids to have too long try bodies,
      basically try bodies with more than one statement
    • Forbids to overlap local and block variables
    • Forbids to use block variables after the block definitions
    • ๐Ÿ”„ Changes how WrongSlotsViolation works, now (...) + value is restricted
      in favor of (..., *value)
    • Forbids to have explicit unhashable types in sets and dicts
    • Forbids to define useless overwritten methods
    • Enforces j prefix over J for complex numbers
    • Forbids overused expressions
    • Forbids explicit 0 division, multiply, pow, addition, and substraction
    • Fordids to pow, multiply, or divide by 1
    • Forbids to use expressions like x + -2, or y - -1, or z -= -1
    • Forbids to multiply lists like [0] * 2
    • Forbids to use variable names like __ and _____
    • Forbids to define unused variables explicitly: _unused = 2
    • Forbids to shadow outer scope variables with local ones
    • Forbids to have too many assert statements in a function
    • Forbids to have explicit string contact: 'a' + some_data, use .format()
    • Now YieldInsideInitViolation is named YieldMagicMethodViolation
      and it also checks different magic methods in a class
    • Forbids to use assert False and other false-constants
    • Forbids to use while False: and other false-constants
    • Forbids to use open() outside of with
    • Forbids to use type() for compares
    • Forbids to have consecutive expressions with too deep access level
    • Forbids to have too many public instance attributes
    • ๐Ÿ–จ Forbids to use pointless star operations: print(*[])
    • Forbids to use range(len(some)), use enumerate(some) instead
    • Forbids to use implicit sum() calls and replace them with loops
    • Forbids to compare with the falsy constants like if some == []:

    ๐Ÿ›  Bugfixes

    • โฌ†๏ธ Bumps flake8-eradicate version
      and solves attrs incompatible versions issue
    • โฌ†๏ธ Bumps flake8-dosctrings veresion
      ๐Ÿ’… and solved pydocstyle issue
    • ๐Ÿ›  Fixes TryExceptMultipleReturnPathViolation not tracking else and finally
      returns at the same time
    • ๐Ÿ›  Fixes how TryExceptMultipleReturnPathViolation works:
      now handles break and raise statements as well
    • ๐Ÿ›  Fixes WrongLoopIterTypeViolation not triggering
      for generator expressions and empty tuples
    • ๐Ÿ›  Fixes WrongLoopIterTypeViolation not triggering
      for numbers (including negative), booleans, None
    • ๐Ÿ›  Fixes WrongLoopIterTypeViolation position
    • ๐Ÿ›  Fixes WrongLoopIterTypeViolation not triggering for compehensions
    • ๐Ÿ›  Fixes WrongSlotsViolation not triggering
      for comprehensions and incorrect __slots__ names and types
    • ๐Ÿ›  Fixes WrongSlotsViolation not triggering
      for invalid python identifiers like __slots__ = ('123_slot',)
    • ๐Ÿ›  Fixes WrongSlotsViolation triggering for subscripts
    • ๐Ÿ›  Fixes NestedClassViolation and NestedFunctionViolation not reporting
      when placed deeply inside other nodes
    • ๐Ÿ›  Fixes when WrongUnpackingViolation was not raised
      for async for and async with nodes
    • ๐Ÿ›  Fixes when WrongUnpackingViolation was not raised for comprehensions
    • ๐Ÿ›  Fixes that x, y, z = x, z, y was not recognized
      as ReassigningVariableToItselfViolation
    • ๐Ÿ›  Fixes that {1, True, 1.0} was not recognised as a set with duplicates
    • ๐Ÿ›  Fixes that {(1, 2), (1, 2)} was not recognised as a set with duplicates
    • Fixes that {*(1, 2), *(1, 2)} was not recognised as a set with duplicates
    • ๐Ÿ›  Fixes that {1: 1, True: 1} was not recognised as a dict with duplicates
    • ๐Ÿ›  Fixes that complex numbers were always treated like magic,
      now 1j is allowed
    • ๐Ÿ›  Fixes that 0.0 was treated as a magic number
    • ๐Ÿ›  Fixes that it was possible to use _ in module body
    • ๐Ÿ›  Fixes WrongBaseClassViolation not triggering
      โœ… for nested nodes like class Test(call().length):
    • ๐Ÿ›  Fixes ComplexDefaultValueViolation not triggering
      for nested nodes like def func(arg=call().attr)
    • Fixes TooShortNameViolation was not triggering for _x and x_
    • ๐Ÿ›  Fixes that some magic method were allowed to be generators
    • ๐Ÿ›  Fixes that some magic method were allowed to contain yield from
    • ๐Ÿ›  Fixes bug when some correct noqa: comments were reported as incorrect
    • ๐Ÿ›  Fixes bug when some else: return were not reported as incorrect
    • ๐Ÿ›  Fixes bug when WPS507 sometimes were raising ValueError
    • ๐Ÿ›  Fixes bug when return None was not recognized as inconsistent

    Misc

    • โž• Adds styles/ directory with style presets for tools we use and recommend
    • โž• Adds bellybutton to the list of other linters
    • ๐Ÿ”ง Documents how to use nitpick to sync the configuration
    • Documents how to use flakehell to create baselines for legacy integrations
    • ๐Ÿ‘Œ Improves tests for binary, octal, hex, and expanetional numbers
    • โž• Adds new xenon CI check
    • ๐Ÿ‘€ Now handles exceptions in our own code, hope to never see them!
    • Now uses coverage checks in deepsource
    • Now @alias checks that all aliases are valid
    • ๐Ÿ”„ Changes how presets are defined
    • ๐Ÿ‘Œ Improves how DirectMagicAttributeAccessViolation is tested
    • ๐Ÿ”จ Refactors a lot of tests to tests ast.Starred
    • ๐Ÿ”จ Refactors a lot of tests to have less tests with the same logical coverage
    • ๐Ÿ‘• We now use import-linter instead of layer-linter
    • โž• Adds docs about CI integration
    • Now wheels are not universal
    • โšก๏ธ Updates docs about snake_case in Enum fields
    • โšก๏ธ Updates docs about WPS400 and incorrect line number
  • v0.11.1 Changes

    July 18, 2019

    ๐Ÿ›  Bugfixes

    • Now using pygments as a direct dependency
  • v0.11.0 Changes

    July 18, 2019

    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
    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
  • v0.10.0 Changes

    ๐Ÿš€ 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 lambdas
    • ๐Ÿ’… 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 heterogeneous 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
    • 0๏ธโƒฃ Renames ComplexDefaultValuesViolation to ComplexDefaultValueViolation
    • ๐Ÿ”จ Refactors UselessOperatorsVisitor
    • โž• Adds compat/ package, getting ready for python3.8
    • โž• Adds Makefile
    • โšก๏ธ A lot of minor dependency updates
  • v0.9.1 Changes

    ๐Ÿ›  Bugfixes

    • ๐Ÿ›  Fixes issue with pydocstyle>=4 by glueing its version to pydocstyle<4
  • v0.9.0 Changes

    ๐Ÿš€ 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
  • v0.8.1 Changes

    ๐Ÿ›  Bugfixes

    • ๐Ÿ›  Fixes how wps_context is calculated, so super() calls are now working
  • v0.8.0 Changes

    ๐Ÿ”‹ Features

    • โšก๏ธ Updates flake8 to 3.7+
    • โž• Adds flake8-annotations-complexity as a dependency, forbids complex annotations
    • Forbids to use redundant +, ~, not, and - operators before numbers
    • 0๏ธโƒฃ Forbids to use complex default values
    • Forbids to use anything rather than names in for loop vars definitions
    • Forbids to use anything rather than names in with block vars definitions
    • Forbids to use anything rather than names in comprehension vars definitions
    • Forbids to use direct magic attributes access
    • Forbids to use negated conditions
    • Forbids to use too many # pragma: no cover comments
    • Forbids to use nested try blocks

    ๐Ÿ›  Bugfixes

    • ๐Ÿ›  Fixes problems with empty lines after magic comments, see #492
    • ๐Ÿ›  Fixes error message for del keyword: it is now just 'del' not 'delete'

    Misc

    • โœ‚ Removes flake8-per-file-ignores plugin, since flake8 now handles it
    • โœ‚ Removes flake8-type-annotations plugin, since flake8 now handles it
    • ๐Ÿ‘Œ Improves docs for WrongKeywordViolation
    • ๐Ÿ‘Œ Improves docs for EmptyLineAfterCodingViolation
    • ๐Ÿ‘Œ Improves docs for ProtectedAttributeViolation
    • โž• Adds docs about .pyi files
  • v0.7.1 Changes

    ๐Ÿ›  Bugfixes

    • ๐Ÿ‘ Allows Generic[SomeType] to be a valid superclass
    • ๐Ÿ‘ฎ Forces to use flake8 version 3.6 instead of 3.7

    Misc

    • ๐Ÿ‘Œ Improves docs about using # type: some comment in for loops