Skip to content

Version 0.7.0

Compare
Choose a tag to compare
@sobolevn sobolevn released this 23 Jan 08:40
· 2163 commits to master since this release
4665b77

Features

  • Now raising a violation for every bool non-keyword argument
    and showing better error message
  • Changes how max-arguments are counted.
    Now self, cls, and mcs count as real arguments
  • Forbids to use yield inside comprehensions
  • Forbids to have single line triple-quoted string assignments
  • Forbids to have same items in set literals
  • Forbids to subclass BaseException
  • Forbids to use simplifiable if expressions and nodes
  • Forbids to have incorrect nodes in class body
  • Forbids to have methods without any arguments
  • Forbids to have incorrect base classes nodes
  • Enforces consistent __slots__ syntax
  • Forbids to use names with trailing _ without a reason
  • Forbids to use super() with arguments or outside of methods
  • Forbids to have too many except cases
  • Enforces to have an empty line after coding comment
  • Forbids to use too many # noqa comments
  • Forbids to use variables declared as unused
  • Forbids to use redundant else blocks
  • Forbids to use inconsistent return and yield statements
  • Forbids to use multiple return path in try/expect/finally
  • Forbids to use implicit string concatenation
  • Forbids to have useless continue nodes inside the loops
  • Forbids to have useless nodes
  • Forbids to have useless raise statements
  • Adds params and parameters to black-listed names

Bugfixes

  • Fixes a lot of rules that were ignoring Bytes node as constant type
  • Fixes location of the BooleanPositionalArgumentViolation
  • Fixes argument count issue with async functions
  • Fixes WrongConditionalVisitor not detecting tuple as constants
  • Fixes WrongConditionalVisitor not detecting negative numbers as constants
  • Fixes some magic number that were not detected based on their location
  • Fixes error when regular functions named as blacklisted
    magic methods were forbidden, now we check for methods only
  • Fixes error when strings like U'some' was not triggering unicode violation
  • Fixes error when string like U'some' was not triggering modifier violation

Misc

  • Adds safety and other dependency checks to the CI process
  • Improves tests: now tokenize works differently inside tests
  • Improves tests: now testing more brackets cases aka "magic coverage bug"
  • Improves docs: adds new badge about our code style
  • Refactoring: trying to use astor where possible to simplify the codebase
  • Refactoring: introduces some new transformations
  • Refactoring: now we do not have any magical text casts for violations
  • Improves tests: changes how flake8 is executed, now it is twice as fast
  • Improves docs: now linting conf.py with flake8
  • Improves tests: now we check that ignored violation are raised with noqa
  • Improves docs: we have added a special graph to show our architecure
  • Improves docs: we now have a clean page for checker without extra junk
  • Improves docs: we now have a tutorial for creating new rules
  • Refactoring: moves presets package to the root
  • Improves tests: we now lint our layered architecure with layer-lint