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-print
as a dependency - Adds
typing-extensions
as a dependency - Forbids to use
quit
andexit
functions - 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
lambda
functions - Forbids extra
object
in parent classes list - Forbids
for
loops with unusedelse
- Forbids variables self reassignment
- Forbids
try
withfinally
withoutexcept
- Forbids
if
statements with invalid conditionals - Forbids opening parenthesis from following keyword without space in between them
- Forbids the use of more than 2
for
loops 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
yield
inside__init__
method
Bugfixes
- Fixes that
MultipleIfsInComprehensionViolation
was not enabled - Fixes flaky behaviour of
test_module_names
test package - Fixed
TooManyMethodsViolation
not displaying line number in output - Fixed
OffsetVisitor
due to python bug
Misc
- Updates
poetry
version - Refactoring: some general changes, including better names and APIs
- Improves docs: now we have
versionadded
for 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
noqa
checks - 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
final
to indicate what should not be changed - Improves types: now we do not have any ugly import hacks