Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
blablatdinov committed Sep 12, 2022
1 parent b11609c commit cb34ca8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_checker/test_noqa.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@
'WPS613': 1,
'WPS614': 1,
'WPS615': 2,
'WPS473': 0,
})

# Violations which may be tweaked by `i_control_code` option:
Expand Down
3 changes: 3 additions & 0 deletions wemake_python_styleguide/options/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
- ``forbidden-inline-ignore`` - list of codes of violations or
class of violations that are forbidden to ignore inline, defaults to
:str:`wemake_python_styleguide.options.defaults.FORBIDDEN_INLINE_IGNORE`
- ``available-expressions-for-one-empty-line`` - number of expressions in
function or method body for available empty line (without code)
:str:`wemake_python_styleguide.options.defaults.AVAILABLE_EXPRESSIONS_FOR_ONE_EMPTY_LINE`
.. rubric:: Complexity options
Expand Down
3 changes: 3 additions & 0 deletions wemake_python_styleguide/presets/types/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
redundancy,
statements,
subscripts,
function_empty_lines,
)

#: Used to store all general visitors to be later passed to checker:
Expand Down Expand Up @@ -107,6 +108,8 @@

redundancy.RedundantEnumerateVisitor,

function_empty_lines.WrongEmptyLinesCountVisitor,

# Modules:
modules.EmptyModuleContentsVisitor,
modules.MagicModuleFunctionsVisitor,
Expand Down
7 changes: 7 additions & 0 deletions wemake_python_styleguide/violations/best_practices.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
KwargsUnpackingInClassDefinitionViolation
ConsecutiveSlicesViolation
GettingElementByUnpackingViolation
WrongEmptyLinesCountViolation
Best practices
--------------
Expand Down Expand Up @@ -166,6 +167,7 @@
.. autoclass:: KwargsUnpackingInClassDefinitionViolation
.. autoclass:: ConsecutiveSlicesViolation
.. autoclass:: GettingElementByUnpackingViolation
.. autoclass:: WrongEmptyLinesCountViolation
"""

Expand Down Expand Up @@ -2802,6 +2804,11 @@ def func(name):
baz()
Configuration:
This rule is configurable with ``--available-expressions-for-one-empty-line``.
Default:
:str:`wemake_python_styleguide.options.defaults.AVAILABLE_EXPRESSIONS_FOR_ONE_EMPTY_LINE`
.. versionadded:: 0.17.0
"""
Expand Down

0 comments on commit cb34ca8

Please sign in to comment.