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