repo_id
string
cross_repo_split
string
commit_index
int32
commit_sha
string
in_repo_split
string
test_file
string
file_split
string
split_group
string
lineno
int32
col_offset
int32
assertion_type
string
test_function
string
prefix
large_string
target
string
assertion_event_type
string
assertion_event_id
string
assertion_anchor
large_string
old_target
string
old_lineno
int32
old_col_offset
int32
wemake-services/wemake-python-styleguide
train
519
2db0c88346b9aaecc1c58ea9c2beb0aa0b7344d3
train
tests/test_visitors/test_ast/test_conditions/test_useless_else/test_useless_loop_else.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_useless_else/test_useless_loop_else.py
157
8
assert_*
test_else_that_can_be_removed
import pytest from wemake_python_styleguide.violations.refactoring import ( UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import UselessElseVisitor # Correct: correct_example1 = """ def wrapper(): for x in ...: raise ... """ correct_example2 = """ while ...: ...
[UselessReturningElseViolation])
added
ed281e6ab487361f76c57d71ae34872adf4155f9bbd168721ec2aa074f8d30bf
assert_*|test_else_that_can_be_removed|import pytest from wemake_python_styleguide.violations.refactoring import ( UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import UselessElseVisitor # Correct: correct_example1 = """ def wrapper(): for x in ...: raise ... """ correct_example...
null
null
null
wemake-services/wemake-python-styleguide
train
520
cfd3e476bcb3d1d39e872fac79c196c0fc36c20a
train
tests/test_formatter/test_formatter_output.py
train
wemake-services/wemake-python-styleguide:tests/test_formatter/test_formatter_output.py
37
4
assert
""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We also don't use ``abso...
pkg_version
modified
ca7e50418e96c8742eee84d93ab07b9ae0004afed72b1e37a40d602cb4ff95ee
assert||""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We also don't use ``...
pkg_version
36
4
wemake-services/wemake-python-styleguide
train
520
cfd3e476bcb3d1d39e872fac79c196c0fc36c20a
train
tests/test_formatter/test_formatter_output.py
train
wemake-services/wemake-python-styleguide:tests/test_formatter/test_formatter_output.py
81
4
assert_*
test_formatter
""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We also don't use ``abso...
'formatter_{0}'.format(output))
modified
e0d1865a29c0d5e04ffd78acde069f79a3cc3a65e71dbcbbde0fe9bdd59b3cc0
assert_*|test_formatter|""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We a...
'formatter_{0}'.format(output))
80
4
wemake-services/wemake-python-styleguide
train
520
cfd3e476bcb3d1d39e872fac79c196c0fc36c20a
train
tests/test_formatter/test_formatter_output.py
train
wemake-services/wemake-python-styleguide:tests/test_formatter/test_formatter_output.py
117
4
assert_*
test_formatter_correct
""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We also don't use ``abso...
'formatter_correct_{0}'.format(output))
modified
da1dcd7dabef0076bfa047d6f90f466ae58b1cade07191e2ed9a4f4eb4bb26c4
assert_*|test_formatter_correct|""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest...
'formatter_correct_{0}'.format(output))
116
4
wemake-services/wemake-python-styleguide
train
520
cfd3e476bcb3d1d39e872fac79c196c0fc36c20a
train
tests/test_formatter/test_formatter_output.py
train
wemake-services/wemake-python-styleguide:tests/test_formatter/test_formatter_output.py
150
4
assert_*
test_ipynb
""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We also don't use ``abso...
'formatter_ipynb')
added
8938606a90f9ff279fda91217b1e020a53433712a8adb285668e7a171738a8aa
assert_*|test_ipynb|""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We also ...
null
null
null
wemake-services/wemake-python-styleguide
train
521
0b65abc849e969ffb9eec13c1190ce8cc5e2c37f
train
tests/test_formatter/test_formatter_output.py
train
wemake-services/wemake-python-styleguide:tests/test_formatter/test_formatter_output.py
150
4
assert_*
test_ipynb
""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We also don't use ``abso...
'formatter_ipynb')
modified
8465cfa13b3b06493f8674f83c3e5ba64734d6546046a9d96cdce08c2635a76d
assert_*|test_ipynb|""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We also ...
'formatter_ipynb')
150
4
wemake-services/wemake-python-styleguide
train
522
233b56606b421507424fab509a2cb92176aac679
train
tests/test_formatter/test_formatter_output.py
train
wemake-services/wemake-python-styleguide:tests/test_formatter/test_formatter_output.py
150
4
assert_*
test_ipynb
""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We also don't use ``abso...
'formatter_ipynb')
modified
724e5a9809c99985a84204a63c24da57b39a936b149f7d36fcf1393af9a01d1b
assert_*|test_ipynb|""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We also ...
'formatter_ipynb')
150
4
wemake-services/wemake-python-styleguide
train
523
174f994f369ddd1b01a6802977852722fa22eaf2
train
tests/test_formatter/test_formatter_output.py
train
wemake-services/wemake-python-styleguide:tests/test_formatter/test_formatter_output.py
150
4
assert_*
test_ipynb
""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We also don't use ``abso...
'formatter_ipynb')
modified
623ed8d1222b407f5e69208264f72fd469d608851a6bad641592c6a9c9ba64af
assert_*|test_ipynb|""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We also ...
'formatter_ipynb')
150
4
wemake-services/wemake-python-styleguide
train
524
c0643896804912f4eda59d22c92560a7b2c9c21a
train
tests/test_formatter/test_formatter_output.py
train
wemake-services/wemake-python-styleguide:tests/test_formatter/test_formatter_output.py
153
4
assert_*
test_ipynb
""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We also don't use ``abso...
'formatter_ipynb')
modified
90e37e815f0db4f40bc450a02c518c49c1806bca2f13b5971f4b988b39c5f6c8
assert_*|test_ipynb|""" We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when running ``pytest``. We also ...
'formatter_ipynb')
150
4
wemake-services/wemake-python-styleguide
train
525
362e826172e2f85266e21384330ae5afbb7af9c0
train
tests/test_visitors/test_ast/test_naming/test_variable_self_reassignment.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_variable_self_reassignment.py
197
4
assert_*
test_self_variable_reassignment
import pytest from wemake_python_styleguide.violations.best_practices import ( ReassigningVariableToItselfViolation, ) from wemake_python_styleguide.visitors.ast.naming.variables import ( WrongVariableAssignmentVisitor, ) # Correct: right_fragment = """ test_variable = 5 test_variable = 10 """ right_typed_f...
[ReassigningVariableToItselfViolation])
added
e08ef50c63f736d6c43ee61de44350fb8360d13fb2ca3561c942cfdb8886db65
assert_*|test_self_variable_reassignment|import pytest from wemake_python_styleguide.violations.best_practices import ( ReassigningVariableToItselfViolation, ) from wemake_python_styleguide.visitors.ast.naming.variables import ( WrongVariableAssignmentVisitor, ) # Correct: right_fragment = """ test_variable = 5 test_va...
null
null
null
wemake-services/wemake-python-styleguide
train
525
362e826172e2f85266e21384330ae5afbb7af9c0
train
tests/test_visitors/test_ast/test_naming/test_variable_self_reassignment.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_variable_self_reassignment.py
216
4
assert_*
test_self_variable_reassignment_double
import pytest from wemake_python_styleguide.violations.best_practices import ( ReassigningVariableToItselfViolation, ) from wemake_python_styleguide.visitors.ast.naming.variables import ( WrongVariableAssignmentVisitor, ) # Correct: right_fragment = """ test_variable = 5 test_variable = 10 """ right_typed_f...
[ ReassigningVariableToItselfViolation, ReassigningVariableToItselfViolation, ])
added
5205fdfbef59d36b755e66fd1cb5fa572391333be62711b088fa2d9bfac26783
assert_*|test_self_variable_reassignment_double|import pytest from wemake_python_styleguide.violations.best_practices import ( ReassigningVariableToItselfViolation, ) from wemake_python_styleguide.visitors.ast.naming.variables import ( WrongVariableAssignmentVisitor, ) # Correct: right_fragment = """ test_variable = 5 ...
null
null
null
wemake-services/wemake-python-styleguide
train
525
362e826172e2f85266e21384330ae5afbb7af9c0
train
tests/test_visitors/test_ast/test_naming/test_variable_self_reassignment.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_variable_self_reassignment.py
238
4
assert_*
test_self_variable_reassignment_triple
import pytest from wemake_python_styleguide.violations.best_practices import ( ReassigningVariableToItselfViolation, ) from wemake_python_styleguide.visitors.ast.naming.variables import ( WrongVariableAssignmentVisitor, ) # Correct: right_fragment = """ test_variable = 5 test_variable = 10 """ right_typed_f...
[ ReassigningVariableToItselfViolation, ReassigningVariableToItselfViolation, ReassigningVariableToItselfViolation, ])
added
fe70926f726e978cd66a4b4ca590734c8ef011f4b3ae951073b08f23d73884e3
assert_*|test_self_variable_reassignment_triple|import pytest from wemake_python_styleguide.violations.best_practices import ( ReassigningVariableToItselfViolation, ) from wemake_python_styleguide.visitors.ast.naming.variables import ( WrongVariableAssignmentVisitor, ) # Correct: right_fragment = """ test_variable = 5 ...
null
null
null
wemake-services/wemake-python-styleguide
train
526
c6ea734c71100f0cac1319c235b6368b78b7a6c0
train
tests/test_visitors/test_ast/test_conditions/test_implicit_complex_compare.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_implicit_complex_compare.py
93
4
assert_*
test_implicit_complex_compare
import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitComplexCompareViolation, ) from wemake_python_styleguide.visitors.ast.conditions import ( ImplicitBoolPatternsVisitor, ) # Won't match our rule with any values: less_or_less = '{0} < {1} or {2} < {3}' less_or_more = '{0} < {1...
[ImplicitComplexCompareViolation])
modified
0ae7b51f2f2b173895c032f38296ce0e5492fd2c9ce6e9b509a690d429407d74
assert_*|test_implicit_complex_compare|import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitComplexCompareViolation, ) from wemake_python_styleguide.visitors.ast.conditions import ( ImplicitBoolPatternsVisitor, ) # Won't match our rule with any values: less_or_less = '{0} < {1} or {2} < {...
[ImplicitComplexCompareViolation])
91
4
wemake-services/wemake-python-styleguide
train
526
c6ea734c71100f0cac1319c235b6368b78b7a6c0
train
tests/test_visitors/test_ast/test_conditions/test_implicit_complex_compare.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_implicit_complex_compare.py
132
4
assert_*
test_implicit_complex_compare_reversed
import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitComplexCompareViolation, ) from wemake_python_styleguide.visitors.ast.conditions import ( ImplicitBoolPatternsVisitor, ) # Won't match our rule with any values: less_or_less = '{0} < {1} or {2} < {3}' less_or_more = '{0} < {1...
[ImplicitComplexCompareViolation])
modified
8bbf5bfc9e246186d58ede3c456c349620cd61f315e14bb2b055a51b2d315ff4
assert_*|test_implicit_complex_compare_reversed|import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitComplexCompareViolation, ) from wemake_python_styleguide.visitors.ast.conditions import ( ImplicitBoolPatternsVisitor, ) # Won't match our rule with any values: less_or_less = '{0} < {1} o...
[ImplicitComplexCompareViolation])
130
4
wemake-services/wemake-python-styleguide
train
527
aef83622a096fe7a59befb268651a959191cd3bc
train
tests/test_visitors/test_ast/test_conditions/test_implicit_complex_compare.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_implicit_complex_compare.py
91
4
assert_*
test_implicit_complex_compare
import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitComplexCompareViolation, ) from wemake_python_styleguide.visitors.ast.conditions import ( ImplicitBoolPatternsVisitor, ) # Won't match our rule with any values: less_or_less = '{0} < {1} or {2} < {3}' less_or_more = '{0} < {1...
[ImplicitComplexCompareViolation])
modified
f78f5ba8d7b9e40e07c9830e66bce717f37dfd038b3da4a4ecf1369152f0010e
assert_*|test_implicit_complex_compare|import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitComplexCompareViolation, ) from wemake_python_styleguide.visitors.ast.conditions import ( ImplicitBoolPatternsVisitor, ) # Won't match our rule with any values: less_or_less = '{0} < {1} or {2} < {...
[ImplicitComplexCompareViolation])
93
4
wemake-services/wemake-python-styleguide
train
527
aef83622a096fe7a59befb268651a959191cd3bc
train
tests/test_visitors/test_ast/test_conditions/test_implicit_complex_compare.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_implicit_complex_compare.py
130
4
assert_*
test_implicit_complex_compare_reversed
import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitComplexCompareViolation, ) from wemake_python_styleguide.visitors.ast.conditions import ( ImplicitBoolPatternsVisitor, ) # Won't match our rule with any values: less_or_less = '{0} < {1} or {2} < {3}' less_or_more = '{0} < {1...
[ImplicitComplexCompareViolation])
modified
405558f70048a898a186615538205b2d2590ecec1634765b06c3d6b689ab5624
assert_*|test_implicit_complex_compare_reversed|import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitComplexCompareViolation, ) from wemake_python_styleguide.visitors.ast.conditions import ( ImplicitBoolPatternsVisitor, ) # Won't match our rule with any values: less_or_less = '{0} < {1} o...
[ImplicitComplexCompareViolation])
132
4
wemake-services/wemake-python-styleguide
train
528
2c750f9fccc4eba5558fe3e9ca90537a6e4b12f5
train
tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return_variables.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return_variables.py
357
4
assert_*
test_wrong_return_variable
import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnVariableViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVariableVisitor, ) # Correct: correct_example1 = """ def some_function(): return 1 """ correct_example2 = """...
[InconsistentReturnVariableViolation])
added
69541b3d597373c9b24f87c50d05da8890ba0ca095a980ed501e97b8f42e4fa7
assert_*|test_wrong_return_variable|import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnVariableViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVariableVisitor, ) # Correct: correct_example1 = """ def some_function(): return 1 """ co...
null
null
null
wemake-services/wemake-python-styleguide
train
528
2c750f9fccc4eba5558fe3e9ca90537a6e4b12f5
train
tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return_variables.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return_variables.py
412
4
assert_*
test_double_wrong_return_variable
import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnVariableViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVariableVisitor, ) # Correct: correct_example1 = """ def some_function(): return 1 """ correct_example2 = """...
[ InconsistentReturnVariableViolation, InconsistentReturnVariableViolation, ])
added
127d59b04673c789e4e23008f5895fa24dda682b3a7a0474450469221e2f7453
assert_*|test_double_wrong_return_variable|import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnVariableViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVariableVisitor, ) # Correct: correct_example1 = """ def some_function(): return 1...
null
null
null
wemake-services/wemake-python-styleguide
train
528
2c750f9fccc4eba5558fe3e9ca90537a6e4b12f5
train
tests/test_visitors/test_ast/test_statements/test_almost_swapped.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_almost_swapped.py
50
4
assert_*
test_wrong_swapped_variables
import pytest from wemake_python_styleguide.violations.refactoring import ( AlmostSwappedViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Correct: correct_swapped_variables = 'a, b = b, a' # Wrong: wrong_swapped_variables = """ a = b b = a """ wr...
[AlmostSwappedViolation])
added
d31d525ff62efa2f2488271450d73651b245dc30a61277dca9f0006e8741c668
assert_*|test_wrong_swapped_variables|import pytest from wemake_python_styleguide.violations.refactoring import ( AlmostSwappedViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Correct: correct_swapped_variables = 'a, b = b, a' # Wrong: wrong_swapped_variables ...
null
null
null
wemake-services/wemake-python-styleguide
train
529
0f16b8359a0675776b1cc105f8c87a42f9fdcd3e
train
tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py
91
4
assert_*
test_wrong_string
import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongFormatStringVisitor, WrongStringVi...
[ TooComplexFormattedStringViolation, FormattedStringViolation, ])
modified
6c113b30754d4cbc0b20c2e5e8e30f47a772c90ce9ee384ea5e1514357810d12
assert_*|test_wrong_string|import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongFormatStringVisitor, Wro...
[ TooComplexFormattedStringViolation, FormattedStringViolation, ])
88
4
wemake-services/wemake-python-styleguide
train
529
0f16b8359a0675776b1cc105f8c87a42f9fdcd3e
train
tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py
121
4
assert_*
test_complex_f_string
import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongFormatStringVisitor, WrongStringVi...
[TooComplexFormattedStringViolation])
modified
1e929fc165e005627187823843ce83a1287fdda1e12c3e1e58d4da9b4f4985f7
assert_*|test_complex_f_string|import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongFormatStringVisitor,...
[TooComplexFormattedStringViolation])
118
4
wemake-services/wemake-python-styleguide
train
529
0f16b8359a0675776b1cc105f8c87a42f9fdcd3e
train
tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py
147
4
assert_*
test_simple_f_string
import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongFormatStringVisitor, WrongStringVi...
[FormattedStringViolation])
added
02682a3ceebeea3b07cff620824012347902622cf80fecb50e747e09bd354224
assert_*|test_simple_f_string|import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongFormatStringVisitor, ...
null
null
null
wemake-services/wemake-python-styleguide
train
530
6ba9cdc814eb213cbc49c49ee5bbecd0b14d27f9
train
tests/test_visitors/test_ast/test_functions/test_call_context/test_range_len.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_call_context/test_range_len.py
68
4
assert_*
test_range_len
import pytest from wemake_python_styleguide.violations.refactoring import ( ImplicitEnumerateViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( WrongFunctionCallContextVisitor, ) for_template = """ def function(): for list_item in {0}: ... """ wrong_samples = ( 'range(...
[ImplicitEnumerateViolation])
added
17354ee5500806a82205820b91df922cc436f553277ae0a59fd5102be104bc53
assert_*|test_range_len|import pytest from wemake_python_styleguide.violations.refactoring import ( ImplicitEnumerateViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( WrongFunctionCallContextVisitor, ) for_template = """ def function(): for list_item in {0}: ... """ wrong_samples = ( 'range(len...
null
null
null
wemake-services/wemake-python-styleguide
train
531
2afe7a83cfc527032f34a159f2a867af701fe2d7
train
tests/test_visitors/test_tokenize/test_statements/test_inconsistent_comprehension.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_statements/test_inconsistent_comprehension.py
626
4
assert_*
test_wrong_comprehension_consistency
import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentComprehensionViolation, ) from wemake_python_styleguide.visitors.tokenize.statements import ( InconsistentComprehensionVisitor, ) # Tests that should NOT be flagged # List comprehension tests correct_list_empty = '[]' c...
[InconsistentComprehensionViolation])
added
fc541133cb226740977313d14ac7b7bc16ae20b50c7e5f2131a1dd7deff0680b
assert_*|test_wrong_comprehension_consistency|import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentComprehensionViolation, ) from wemake_python_styleguide.visitors.tokenize.statements import ( InconsistentComprehensionVisitor, ) # Tests that should NOT be flagged # List comprehension ...
null
null
null
wemake-services/wemake-python-styleguide
train
531
2afe7a83cfc527032f34a159f2a867af701fe2d7
train
tests/test_visitors/test_tokenize/test_statements/test_inconsistent_comprehension.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_statements/test_inconsistent_comprehension.py
705
4
assert_*
test_wrong_async_keyword_placement
import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentComprehensionViolation, ) from wemake_python_styleguide.visitors.tokenize.statements import ( InconsistentComprehensionVisitor, ) # Tests that should NOT be flagged # List comprehension tests correct_list_empty = '[]' c...
[InconsistentComprehensionViolation])
added
7bb86f3387fdc0178a64ca82943fc5aab6eb8a47d399ed3f676a0eb688d58b07
assert_*|test_wrong_async_keyword_placement|import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentComprehensionViolation, ) from wemake_python_styleguide.visitors.tokenize.statements import ( InconsistentComprehensionVisitor, ) # Tests that should NOT be flagged # List comprehension te...
null
null
null
wemake-services/wemake-python-styleguide
train
532
c7bd5726803d889e57f7c25cb0d63bb9f553a738
train
tests/test_violations/test_codes.py
train
wemake-services/wemake-python-styleguide:tests/test_violations/test_codes.py
5
4
assert
test_all_unique_violation_codes
def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [int(violation.code) for violation in all_violations] assert len(set(codes)) ==
len(all_violations)
added
3eed4194d6fa71ac9b365ca4659344d034687c749709316007f411da4fc290c1
assert|test_all_unique_violation_codes|def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [int(violation.code) for violation in all_violations] assert len(set(codes)) ==
null
null
null
wemake-services/wemake-python-styleguide
train
532
c7bd5726803d889e57f7c25cb0d63bb9f553a738
train
tests/test_violations/test_codes.py
train
wemake-services/wemake-python-styleguide:tests/test_violations/test_codes.py
15
12
assert
test_all_violations_correct_numbers
def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [int(violation.code) for violation in all_violations] assert len(set(codes)) == len(all_violations) def test_all_violations_correct_numbers(all_module_violations): """Ensures th...
violation_class.code
added
4715848e1fe3c556182fe0661e493d24988320d7d64394c918e3ab49b5110935
assert|test_all_violations_correct_numbers|def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [int(violation.code) for violation in all_violations] assert len(set(codes)) == len(all_violations) def test_all_violations_correct_numbers(all_module_vi...
null
null
null
wemake-services/wemake-python-styleguide
train
532
c7bd5726803d889e57f7c25cb0d63bb9f553a738
train
tests/test_violations/test_codes.py
train
wemake-services/wemake-python-styleguide:tests/test_violations/test_codes.py
27
8
assert
test_violations_start_zero
def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [int(violation.code) for violation in all_violations] assert len(set(codes)) == len(all_violations) def test_all_violations_correct_numbers(all_module_violations): """Ensures th...
index * 100
modified
67ea2adc8315e546702d57a40fbc19406c37112bafc78964aef9f1c62ea45ae9
assert|test_violations_start_zero|def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [int(violation.code) for violation in all_violations] assert len(set(codes)) == len(all_violations) def test_all_violations_correct_numbers(all_module_violations)...
index * 100
30
8
wemake-services/wemake-python-styleguide
train
532
c7bd5726803d889e57f7c25cb0d63bb9f553a738
train
tests/test_violations/test_codes.py
train
wemake-services/wemake-python-styleguide:tests/test_violations/test_codes.py
37
16
assert
test_no_holes
def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [int(violation.code) for violation in all_violations] assert len(set(codes)) == len(all_violations) def test_all_violations_correct_numbers(all_module_violations): """Ensures th...
diff == 1 or diff > 2
modified
32123152e39e3864d39ab035b7bd051c477c35f670d683ff1876d81cfa45751a
assert|test_no_holes|def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [int(violation.code) for violation in all_violations] assert len(set(codes)) == len(all_violations) def test_all_violations_correct_numbers(all_module_violations): """Ensures ...
diff == 1 or diff > 2
40
16
wemake-services/wemake-python-styleguide
train
534
c7c77b7d5a4bed0e6bd079aa7615c1a97d81a0b9
train
tests/test_visitors/test_tokenize/test_conditions/test_implict_elif_oneline.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_conditions/test_implict_elif_oneline.py
34
4
assert_*
test_if_else_one_line
from wemake_python_styleguide.violations.refactoring import ( ImplicitElifViolation, ) from wemake_python_styleguide.visitors.tokenize.conditions import IfElseVisitor code_that_breaks = """ number = int(input()) if number == 1: print("1") else: if number == 2: print("2") """ code_implict_if_else = """ if ...
[ImplicitElifViolation])
added
24aa6927a840d56d8be185591d64d5039aae836943753a390ab0d8def7a3054f
assert_*|test_if_else_one_line|from wemake_python_styleguide.violations.refactoring import ( ImplicitElifViolation, ) from wemake_python_styleguide.visitors.tokenize.conditions import IfElseVisitor code_that_breaks = """ number = int(input()) if number == 1: print("1") else: if number == 2: print("2") """ code_implict_...
null
null
null
wemake-services/wemake-python-styleguide
train
534
c7c77b7d5a4bed0e6bd079aa7615c1a97d81a0b9
train
tests/test_visitors/test_tokenize/test_conditions/test_implict_elif_oneline.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_conditions/test_implict_elif_oneline.py
48
4
assert_*
test_if_else_implict
from wemake_python_styleguide.violations.refactoring import ( ImplicitElifViolation, ) from wemake_python_styleguide.visitors.tokenize.conditions import IfElseVisitor code_that_breaks = """ number = int(input()) if number == 1: print("1") else: if number == 2: print("2") """ code_implict_if_else = """ if ...
[ImplicitElifViolation])
added
f1893b63ed05b6a288131e61f780e145e8272d43a27579d44d5c3d00d273f437
assert_*|test_if_else_implict|from wemake_python_styleguide.violations.refactoring import ( ImplicitElifViolation, ) from wemake_python_styleguide.visitors.tokenize.conditions import IfElseVisitor code_that_breaks = """ number = int(input()) if number == 1: print("1") else: if number == 2: print("2") """ code_implict_i...
null
null
null
wemake-services/wemake-python-styleguide
train
535
f2e876adbb68784373ad87483e0b0bfb95c6fc7f
train
tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return.py
184
4
assert_*
test_wrong_return_statement
import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): ... """ correct_example2 = """ def function(): retur...
[InconsistentReturnViolation])
added
643a4915038b99a204e9771f12c5c063a322d23fd5bc548d309ae3f0ef2cc5d4
assert_*|test_wrong_return_statement|import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): ... """ correct_example2 = """ def ...
null
null
null
wemake-services/wemake-python-styleguide
train
535
f2e876adbb68784373ad87483e0b0bfb95c6fc7f
train
tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return.py
207
4
assert_*
test_double_wrong_return_statement
import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): ... """ correct_example2 = """ def function(): retur...
[ InconsistentReturnViolation, InconsistentReturnViolation, ])
added
b64209d657704164cd0cfa49b93ba1769b0549f7e237a13ae95916a1d27da60b
assert_*|test_double_wrong_return_statement|import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): ... """ correct_example2 = "...
null
null
null
wemake-services/wemake-python-styleguide
train
535
f2e876adbb68784373ad87483e0b0bfb95c6fc7f
train
tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_yield.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_yield.py
116
4
assert_*
test_wrong_yield_statement
import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentYieldViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): yield """ correct_example2 = """ def function(): yiel...
[InconsistentYieldViolation])
added
90b90bbeb64e39bea324eb30ee3fc0586f813ade5a80396a8ba880e89c30de6d
assert_*|test_wrong_yield_statement|import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentYieldViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): yield """ correct_example2 = """ def ...
null
null
null
wemake-services/wemake-python-styleguide
train
536
de7aedbdd8f72f998033c40b8a9fc1f894f7179b
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
325
12
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
93a6032c40e022fd694f7320395e559ea8dd8db303b1a1f085f8bac2ead98a6a
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
324
12
wemake-services/wemake-python-styleguide
train
536
de7aedbdd8f72f998033c40b8a9fc1f894f7179b
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
328
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
4ad33ae9625fb1a4cd50c3a26916aabf592eefd8f317c29667cc8d1041f8b901
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
327
8
wemake-services/wemake-python-styleguide
train
536
de7aedbdd8f72f998033c40b8a9fc1f894f7179b
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
338
4
assert
test_codes
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_violations)
modified
6f804ebff80959f1d7a57e7925dc5aa98ec937f7b405200363526a9c63669ed4
assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a...
len(all_violations)
337
4
wemake-services/wemake-python-styleguide
train
536
de7aedbdd8f72f998033c40b8a9fc1f894f7179b
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
423
4
assert
test_noqa_fixture_disabled_no_control
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_controlled_violations)
modified
fbdf32d1f8d3cf236ab16edd8c4e2905396135601bf2307628bbbf966a854bcd
assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st...
len(all_controlled_violations)
422
4
wemake-services/wemake-python-styleguide
train
536
de7aedbdd8f72f998033c40b8a9fc1f894f7179b
train
tests/test_visitors/test_ast/test_keywords/test_raise.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_raise.py
55
4
assert_*
test_raise_not_implemented
import pytest from wemake_python_styleguide.violations.best_practices import ( BareRaiseViolation, BaseExceptionRaiseViolation, RaiseNotImplementedViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_exception_method = """ class CheckAbstractMethods(): def ch...
[RaiseNotImplementedViolation])
modified
6304f4406fdff582a3b0bae401402b1d9111b10fa800f73561397d36e7cd07d8
assert_*|test_raise_not_implemented|import pytest from wemake_python_styleguide.violations.best_practices import ( BareRaiseViolation, BaseExceptionRaiseViolation, RaiseNotImplementedViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_exception_method = """ class CheckAbstrac...
[RaiseNotImplementedViolation])
54
4
wemake-services/wemake-python-styleguide
train
536
de7aedbdd8f72f998033c40b8a9fc1f894f7179b
train
tests/test_visitors/test_ast/test_keywords/test_raise.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_raise.py
84
4
assert_*
test_raise_base_exception
import pytest from wemake_python_styleguide.violations.best_practices import ( BareRaiseViolation, BaseExceptionRaiseViolation, RaiseNotImplementedViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_exception_method = """ class CheckAbstractMethods(): def ch...
[BaseExceptionRaiseViolation])
modified
ea50ae3c8502d461ad76a2c99c14590d456310c4e1a11fd9c80b84dc1da84971
assert_*|test_raise_base_exception|import pytest from wemake_python_styleguide.violations.best_practices import ( BareRaiseViolation, BaseExceptionRaiseViolation, RaiseNotImplementedViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_exception_method = """ class CheckAbstract...
[BaseExceptionRaiseViolation])
83
4
wemake-services/wemake-python-styleguide
train
536
de7aedbdd8f72f998033c40b8a9fc1f894f7179b
train
tests/test_visitors/test_ast/test_keywords/test_raise.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_raise.py
169
4
assert_*
test_bare_raise
import pytest from wemake_python_styleguide.violations.best_practices import ( BareRaiseViolation, BaseExceptionRaiseViolation, RaiseNotImplementedViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_exception_method = """ class CheckAbstractMethods(): def ch...
[BareRaiseViolation])
added
97f9f9850478af15bcf459a0c12f78fa1b95e4399229ca17742659b859de26cb
assert_*|test_bare_raise|import pytest from wemake_python_styleguide.violations.best_practices import ( BareRaiseViolation, BaseExceptionRaiseViolation, RaiseNotImplementedViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_exception_method = """ class CheckAbstractMethods():...
null
null
null
wemake-services/wemake-python-styleguide
train
537
fddbd8fa7b269bb75ee70e42c442e10db9012a24
train
tests/test_visitors/test_ast/test_conditions/test_useless_else/test_useless_loop_else.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_useless_else/test_useless_loop_else.py
183
8
assert_*
test_else_that_can_be_removed
import pytest from wemake_python_styleguide.violations.refactoring import ( UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import UselessElseVisitor # Correct: correct_example1 = """ def wrapper(): for x in ...: raise ... """ correct_example2 = """ while ...: ...
[UselessReturningElseViolation])
added
3eb56ee0f50ad586c6c455bfa2a4eb6fd4f84dc48dc31ed3bee64cd966f2fe6e
assert_*|test_else_that_can_be_removed|import pytest from wemake_python_styleguide.violations.refactoring import ( UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import UselessElseVisitor # Correct: correct_example1 = """ def wrapper(): for x in ...: raise ... """ correct_example...
null
null
null
wemake-services/wemake-python-styleguide
train
538
08e702020679e51578885de8986e64ab429be127
train
tests/test_visitors/test_ast/test_conditions/test_useless_else/test_useless_loop_else.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_useless_else/test_useless_loop_else.py
184
8
assert_*
test_else_that_can_be_removed
import pytest from wemake_python_styleguide.violations.refactoring import ( UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import UselessElseVisitor # Correct: correct_example1 = """ def wrapper(): for x in ...: raise ... """ correct_example2 = """ while ...: ...
[UselessReturningElseViolation])
modified
bfc6c2d9ff3c62a6679f167b616d41af6a5cba4d9c34969748a93e5c813f79d2
assert_*|test_else_that_can_be_removed|import pytest from wemake_python_styleguide.violations.refactoring import ( UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import UselessElseVisitor # Correct: correct_example1 = """ def wrapper(): for x in ...: raise ... """ correct_example...
[UselessReturningElseViolation])
183
8
wemake-services/wemake-python-styleguide
train
539
578fca9ce89c409259545e3ecc4c7e8649c07dc4
train
tests/test_visitors/test_ast/test_naming/test_variable_self_reassignment.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_variable_self_reassignment.py
199
4
assert_*
test_self_variable_reassignment
import pytest from wemake_python_styleguide.violations.best_practices import ( ReassigningVariableToItselfViolation, ) from wemake_python_styleguide.visitors.ast.naming.variables import ( WrongVariableAssignmentVisitor, ) # Correct: right_fragment = """ test_variable = 5 test_variable = 10 """ right_typed_f...
[ReassigningVariableToItselfViolation])
modified
6076b2078789512e1d0a6853d27a9a2a2ac49a38f6412f1636d1c960ab4b54b1
assert_*|test_self_variable_reassignment|import pytest from wemake_python_styleguide.violations.best_practices import ( ReassigningVariableToItselfViolation, ) from wemake_python_styleguide.visitors.ast.naming.variables import ( WrongVariableAssignmentVisitor, ) # Correct: right_fragment = """ test_variable = 5 test_va...
[ReassigningVariableToItselfViolation])
197
4
wemake-services/wemake-python-styleguide
train
539
578fca9ce89c409259545e3ecc4c7e8649c07dc4
train
tests/test_visitors/test_ast/test_naming/test_variable_self_reassignment.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_variable_self_reassignment.py
218
4
assert_*
test_self_variable_reassignment_double
import pytest from wemake_python_styleguide.violations.best_practices import ( ReassigningVariableToItselfViolation, ) from wemake_python_styleguide.visitors.ast.naming.variables import ( WrongVariableAssignmentVisitor, ) # Correct: right_fragment = """ test_variable = 5 test_variable = 10 """ right_typed_f...
[ ReassigningVariableToItselfViolation, ReassigningVariableToItselfViolation, ])
modified
4eb75a2014d47874ec6e79f59c5ea3639816d6d7cf8c8599a11486c52d86cf2e
assert_*|test_self_variable_reassignment_double|import pytest from wemake_python_styleguide.violations.best_practices import ( ReassigningVariableToItselfViolation, ) from wemake_python_styleguide.visitors.ast.naming.variables import ( WrongVariableAssignmentVisitor, ) # Correct: right_fragment = """ test_variable = 5 ...
[ ReassigningVariableToItselfViolation, ReassigningVariableToItselfViolation, ])
216
4
wemake-services/wemake-python-styleguide
train
539
578fca9ce89c409259545e3ecc4c7e8649c07dc4
train
tests/test_visitors/test_ast/test_naming/test_variable_self_reassignment.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_variable_self_reassignment.py
240
4
assert_*
test_self_variable_reassignment_triple
import pytest from wemake_python_styleguide.violations.best_practices import ( ReassigningVariableToItselfViolation, ) from wemake_python_styleguide.visitors.ast.naming.variables import ( WrongVariableAssignmentVisitor, ) # Correct: right_fragment = """ test_variable = 5 test_variable = 10 """ right_typed_f...
[ ReassigningVariableToItselfViolation, ReassigningVariableToItselfViolation, ReassigningVariableToItselfViolation, ])
modified
c431e58d520fdb162b673c7437be299ddd01c7b5e7972b5c967a4dd4f957bde1
assert_*|test_self_variable_reassignment_triple|import pytest from wemake_python_styleguide.violations.best_practices import ( ReassigningVariableToItselfViolation, ) from wemake_python_styleguide.visitors.ast.naming.variables import ( WrongVariableAssignmentVisitor, ) # Correct: right_fragment = """ test_variable = 5 ...
[ ReassigningVariableToItselfViolation, ReassigningVariableToItselfViolation, ReassigningVariableToItselfViolation, ])
238
4
wemake-services/wemake-python-styleguide
train
540
ac1e6c496cf4cb707679b902c6e4d416b914c656
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
329
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
c2546bc2c34e90ee554e59c30c8002a245646d36ddb587875f6b528da037fac4
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
328
8
wemake-services/wemake-python-styleguide
train
540
ac1e6c496cf4cb707679b902c6e4d416b914c656
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
330
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors.get(found_error)
modified
e716a91cceed16f6d82f637e479fbcc6bfd849282ff088f9a45bef53a4455805
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors.get(found_error)
329
8
wemake-services/wemake-python-styleguide
train
540
ac1e6c496cf4cb707679b902c6e4d416b914c656
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
339
4
assert
test_codes
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_violations)
modified
595b32defcbd0184df353c6c5959f3ece0a34036f169aa07ae21f937425cd94d
assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a...
len(all_violations)
338
4
wemake-services/wemake-python-styleguide
train
540
ac1e6c496cf4cb707679b902c6e4d416b914c656
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
424
4
assert
test_noqa_fixture_disabled_no_control
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_controlled_violations)
modified
b61ffe39b8c4f56c4132ebc4e767d299cb6acc174238ffa3a1946d9222b1c1e6
assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st...
len(all_controlled_violations)
423
4
wemake-services/wemake-python-styleguide
train
540
ac1e6c496cf4cb707679b902c6e4d416b914c656
train
tests/test_visitors/test_ast/test_redundancy/test_redundant_enumerate.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_redundancy/test_redundant_enumerate.py
119
4
assert_*
test_wrong_usage_of_enumerate
import pytest from wemake_python_styleguide.violations.best_practices import ( RedundantEnumerateViolation, ) from wemake_python_styleguide.visitors.ast.redundancy import ( RedundantEnumerateVisitor, ) # Correct: correct_iteration_without_enumerate = """ def container(): for item in items: ... """ ...
[RedundantEnumerateViolation])
added
bf98e6941c831405e31121446c1766c1a6b2c07153223e373247cf2f46d04037
assert_*|test_wrong_usage_of_enumerate|import pytest from wemake_python_styleguide.violations.best_practices import ( RedundantEnumerateViolation, ) from wemake_python_styleguide.visitors.ast.redundancy import ( RedundantEnumerateVisitor, ) # Correct: correct_iteration_without_enumerate = """ def container(): for item ...
null
null
null
wemake-services/wemake-python-styleguide
train
540
ac1e6c496cf4cb707679b902c6e4d416b914c656
train
tests/test_visitors/test_ast/test_redundancy/test_redundant_enumerate.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_redundancy/test_redundant_enumerate.py
138
4
assert_*
test_wrong_multiple_generators
import pytest from wemake_python_styleguide.violations.best_practices import ( RedundantEnumerateViolation, ) from wemake_python_styleguide.visitors.ast.redundancy import ( RedundantEnumerateVisitor, ) # Correct: correct_iteration_without_enumerate = """ def container(): for item in items: ... """ ...
[ RedundantEnumerateViolation, RedundantEnumerateViolation, ])
added
8e4471ccfadae9a9334e47d54bcb1e4a7274589a117d9c389284a678597b4580
assert_*|test_wrong_multiple_generators|import pytest from wemake_python_styleguide.violations.best_practices import ( RedundantEnumerateViolation, ) from wemake_python_styleguide.visitors.ast.redundancy import ( RedundantEnumerateVisitor, ) # Correct: correct_iteration_without_enumerate = """ def container(): for item...
null
null
null
wemake-services/wemake-python-styleguide
train
541
86c8775726098d32bee5d85fe572db8cf7afd077
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
327
12
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
91dd49cd0ebb903cdfc67e3741407fd2387d0ecf5ca72806ced916d4229e347f
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
326
12
wemake-services/wemake-python-styleguide
train
541
86c8775726098d32bee5d85fe572db8cf7afd077
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
331
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors.get(found_error)
modified
d63bf323cb99b634ae060c99c2679f0fd6d002f187785611b6dccb2c5437ee25
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors.get(found_error)
330
8
wemake-services/wemake-python-styleguide
train
541
86c8775726098d32bee5d85fe572db8cf7afd077
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
340
4
assert
test_codes
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_violations)
modified
9c265d2f82db13ab487163ef9db5d79a9f8b4e722407c507669d052a62814a81
assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a...
len(all_violations)
339
4
wemake-services/wemake-python-styleguide
train
541
86c8775726098d32bee5d85fe572db8cf7afd077
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
425
4
assert
test_noqa_fixture_disabled_no_control
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_controlled_violations)
modified
7c918dc8514d89b0365acc435719f0a0a68b2f1b199d1cae46af8a88f10a78d1
assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st...
len(all_controlled_violations)
424
4
wemake-services/wemake-python-styleguide
train
541
86c8775726098d32bee5d85fe572db8cf7afd077
train
tests/test_visitors/test_ast/test_keywords/test_raise/test_bare_raise_violation.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_raise/test_bare_raise_violation.py
24
4
assert_*
test_bare_raise
import pytest from wemake_python_styleguide.violations.best_practices import ( BareRaiseViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor def test_bare_raise( assert_errors, parse_ast_tree, default_options, ): """Testing bare raise without except block.""" ...
[BareRaiseViolation])
added
0336d51401089ba73c9baabc930aa8bf3e363f2f65d92af3001cbce88b774352
assert_*|test_bare_raise|import pytest from wemake_python_styleguide.violations.best_practices import ( BareRaiseViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor def test_bare_raise( assert_errors, parse_ast_tree, default_options, ): """Testing bare raise without except block.""...
null
null
null
wemake-services/wemake-python-styleguide
train
541
86c8775726098d32bee5d85fe572db8cf7afd077
train
tests/test_visitors/test_ast/test_keywords/test_raise/test_exception_raise_violation.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_raise/test_exception_raise_violation.py
55
4
assert_*
test_raise_base_exception
import pytest from wemake_python_styleguide.violations.best_practices import ( BaseExceptionRaiseViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_exception_method = """ class CheckAbstractMethods(): def check_exception(self): raise {0} """ raise_exceptio...
[BaseExceptionRaiseViolation])
added
a2bc0e06d1dddada2766016e429e936f0d3a089714b9a08bf0f566257e424c5e
assert_*|test_raise_base_exception|import pytest from wemake_python_styleguide.violations.best_practices import ( BaseExceptionRaiseViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_exception_method = """ class CheckAbstractMethods(): def check_exception(self): raise {0} ""...
null
null
null
wemake-services/wemake-python-styleguide
train
541
86c8775726098d32bee5d85fe572db8cf7afd077
train
tests/test_visitors/test_ast/test_keywords/test_raise/test_raise_from_itself_violation.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_raise/test_raise_from_itself_violation.py
38
4
assert_*
test_raise_from_itself
import pytest from wemake_python_styleguide.violations.best_practices import ( RaiseFromItselfViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_from_itself_outside_try = """ e = Exception('Some Exception') raise e from e """ raise_from_itself_inside_try = """ def rai...
[RaiseFromItselfViolation])
added
ba6bd179a633c19bf49e3e6869a11046fc947397925a23b9c840787ed64f1601
assert_*|test_raise_from_itself|import pytest from wemake_python_styleguide.violations.best_practices import ( RaiseFromItselfViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_from_itself_outside_try = """ e = Exception('Some Exception') raise e from e """ raise_from_itself...
null
null
null
wemake-services/wemake-python-styleguide
train
541
86c8775726098d32bee5d85fe572db8cf7afd077
train
tests/test_visitors/test_ast/test_keywords/test_raise/test_raise_not_implemented_violation.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_raise/test_raise_not_implemented_violation.py
53
4
assert_*
test_raise_not_implemented
import pytest from wemake_python_styleguide.violations.best_practices import ( RaiseNotImplementedViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_exception_method = """ class CheckAbstractMethods(): def check_exception(self): raise {0} """ raise_excepti...
[RaiseNotImplementedViolation])
added
fe8ce58119dece0218c17f203feb7950f9825d19369610297f85a02bb43fdd36
assert_*|test_raise_not_implemented|import pytest from wemake_python_styleguide.violations.best_practices import ( RaiseNotImplementedViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_exception_method = """ class CheckAbstractMethods(): def check_exception(self): raise {0} ...
null
null
null
wemake-services/wemake-python-styleguide
train
542
5a30c3cf1552fc54805e846a901d9a391978bcfc
train
tests/test_visitors/test_ast/test_classes/test_base_classes/test_base_builtin_classes.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_base_classes/test_base_builtin_classes.py
32
4
assert_*
test_builtin_subclass
import pytest from wemake_python_styleguide.violations.oop import BuiltinSubclassViolation from wemake_python_styleguide.visitors.ast.classes import WrongClassDefVisitor class_with_base = """ class TestClass({0}): '''Docs.''' """ @pytest.mark.parametrize('super_class', [ 'int', 'str', 'bool', 'l...
[BuiltinSubclassViolation])
modified
85a281db99f3931405752c79270e6383f23207e3cbb6ff71b8456edfff73f29a
assert_*|test_builtin_subclass|import pytest from wemake_python_styleguide.violations.oop import BuiltinSubclassViolation from wemake_python_styleguide.visitors.ast.classes import WrongClassDefVisitor class_with_base = """ class TestClass({0}): '''Docs.''' """ @pytest.mark.parametrize('super_class', [ 'int', 'str', 'bo...
[BuiltinSubclassViolation])
32
4
wemake-services/wemake-python-styleguide
train
542
5a30c3cf1552fc54805e846a901d9a391978bcfc
train
tests/test_visitors/test_ast/test_classes/test_base_classes/test_base_exception_base_class.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_base_classes/test_base_exception_base_class.py
23
4
assert_*
test_base_exception_subclass
from wemake_python_styleguide.violations.best_practices import ( BaseExceptionSubclassViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassDefVisitor class_with_base = """ class Meta({0}): '''Docs.''' """ def test_base_exception_subclass( assert_errors, parse_ast_tree, ...
[BaseExceptionSubclassViolation])
modified
a7434ec3cb897cba3e735dd389a1429550b4c948991d22441cd78768fcdea93a
assert_*|test_base_exception_subclass|from wemake_python_styleguide.violations.best_practices import ( BaseExceptionSubclassViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassDefVisitor class_with_base = """ class Meta({0}): '''Docs.''' """ def test_base_exception_subclass( assert_errors, ...
[BaseExceptionSubclassViolation])
23
4
wemake-services/wemake-python-styleguide
train
542
5a30c3cf1552fc54805e846a901d9a391978bcfc
train
tests/test_visitors/test_ast/test_classes/test_base_classes/test_class_definition_arguments.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_base_classes/test_class_definition_arguments.py
43
4
assert_*
test_kwargs_unpacking_violation
import pytest from wemake_python_styleguide.violations.best_practices import ( KwargsUnpackingInClassDefinitionViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassDefVisitor class_definition_with_unpacking_one = """ kwargs = {'some_arg': 'some_arg'} class TestClass(object, **kwargs): ...
[KwargsUnpackingInClassDefinitionViolation])
added
4eb2b7a41993c2623b50d16dbfd20f90b883eaafa645d22472228524d484b226
assert_*|test_kwargs_unpacking_violation|import pytest from wemake_python_styleguide.violations.best_practices import ( KwargsUnpackingInClassDefinitionViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassDefVisitor class_definition_with_unpacking_one = """ kwargs = {'some_arg': 'some_arg'} ...
null
null
null
wemake-services/wemake-python-styleguide
train
542
5a30c3cf1552fc54805e846a901d9a391978bcfc
train
tests/test_visitors/test_ast/test_classes/test_base_classes/test_expression_base_class.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_base_classes/test_expression_base_class.py
40
4
assert_*
test_base_class_expression
import pytest from wemake_python_styleguide.violations.oop import WrongBaseClassViolation from wemake_python_styleguide.visitors.ast.classes import WrongClassDefVisitor class_with_base = """ class Meta({0}): '''Docs.''' """ @pytest.mark.parametrize('base', [ '(lambda: object)()', 'method.call()', '-...
[WrongBaseClassViolation])
modified
ba03d0d3ec2b8c92a23248cf8cd81ed870ad7afb2e173923ecdd5ca2d6b11f3d
assert_*|test_base_class_expression|import pytest from wemake_python_styleguide.violations.oop import WrongBaseClassViolation from wemake_python_styleguide.visitors.ast.classes import WrongClassDefVisitor class_with_base = """ class Meta({0}): '''Docs.''' """ @pytest.mark.parametrize('base', [ '(lambda: object)()', 'me...
[WrongBaseClassViolation])
40
4
wemake-services/wemake-python-styleguide
train
542
5a30c3cf1552fc54805e846a901d9a391978bcfc
train
tests/test_visitors/test_ast/test_classes/test_base_classes/test_object_as_parent.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_base_classes/test_object_as_parent.py
39
4
assert_*
test_wrong_class_definition_multiple_parent
import pytest from wemake_python_styleguide.violations.consistency import ( ObjectInBaseClassesListViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassDefVisitor extra_object = """ class TestClassName(FirstName, SecondName, object): '''Docs.''' """ single_extra_object = """ class...
[ObjectInBaseClassesListViolation])
modified
f7dadd85db66d69de1257b1871e143b827c419c71d72d7f399b90d44e9725856
assert_*|test_wrong_class_definition_multiple_parent|import pytest from wemake_python_styleguide.violations.consistency import ( ObjectInBaseClassesListViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassDefVisitor extra_object = """ class TestClassName(FirstName, SecondName, object): '''Do...
[ObjectInBaseClassesListViolation])
39
4
wemake-services/wemake-python-styleguide
train
542
5a30c3cf1552fc54805e846a901d9a391978bcfc
train
tests/test_visitors/test_ast/test_classes/test_base_classes/test_object_base_class.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_base_classes/test_object_base_class.py
64
4
assert_*
test_wrong_base_class
import pytest from wemake_python_styleguide.violations.consistency import ( RequiredBaseClassViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassDefVisitor class_without_base = """ class Meta: '''Docs.''' """ class_with_empty_base = """ class Meta(): '''Docs.''' """ nested_c...
'Meta')
modified
c752f2e684a2f0c5372e7f6bc2fef9c92bb805cde30b79579f49664b8c92bb84
assert_*|test_wrong_base_class|import pytest from wemake_python_styleguide.violations.consistency import ( RequiredBaseClassViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassDefVisitor class_without_base = """ class Meta: '''Docs.''' """ class_with_empty_base = """ class Meta(): '''Docs.'...
'Meta')
64
4
wemake-services/wemake-python-styleguide
train
542
5a30c3cf1552fc54805e846a901d9a391978bcfc
train
tests/test_visitors/test_ast/test_classes/test_getter_setter.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_getter_setter.py
293
4
assert_*
test_instance_getter_setter
import pytest from wemake_python_styleguide.violations.oop import ( UnpythonicGetterSetterViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassBodyVisitor module_getter_and_setter = """ attribute = 1 def get_attribute(): ... def set_attribute(): ... """ static_getter_and_set...
[UnpythonicGetterSetterViolation])
modified
3781d4fee539463d9478bb25913d29a8ea21006a82295f29b79f95e4f3bd5bf6
assert_*|test_instance_getter_setter|import pytest from wemake_python_styleguide.violations.oop import ( UnpythonicGetterSetterViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassBodyVisitor module_getter_and_setter = """ attribute = 1 def get_attribute(): ... def set_attribute(): ... """ s...
[UnpythonicGetterSetterViolation])
293
4
wemake-services/wemake-python-styleguide
train
542
5a30c3cf1552fc54805e846a901d9a391978bcfc
train
tests/test_visitors/test_ast/test_classes/test_wrong_class_body.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_wrong_class_body.py
36
4
assert_*
test_incorrect_body_items
import pytest from wemake_python_styleguide.violations.oop import ( WrongClassBodyContentViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassBodyVisitor class_body_template = """ class ClassWithBody(object): {0} """ @pytest.mark.parametrize('code', [ '...', '1', 'Non...
[WrongClassBodyContentViolation])
modified
4f7cb07c07f2cae9b02b247e16e318f5463e41e70f63315f2096823406c46a67
assert_*|test_incorrect_body_items|import pytest from wemake_python_styleguide.violations.oop import ( WrongClassBodyContentViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassBodyVisitor class_body_template = """ class ClassWithBody(object): {0} """ @pytest.mark.parametrize('code', [ '...'...
[WrongClassBodyContentViolation])
36
4
wemake-services/wemake-python-styleguide
train
543
ba51ad44fb116e9e0bec9b81a2fb540048eb4080
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
329
12
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
95dd5d55c3f88f0affa5d92680a740b0e44c9fb948e96351fb66d6137d772c6e
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
328
12
wemake-services/wemake-python-styleguide
train
543
ba51ad44fb116e9e0bec9b81a2fb540048eb4080
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
333
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors.get(found_error)
modified
34fbdedf9ccbb0a519b093c91ebe1dcb0dc2eebcdb3c3da438135483f9c88258
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors.get(found_error)
332
8
wemake-services/wemake-python-styleguide
train
543
ba51ad44fb116e9e0bec9b81a2fb540048eb4080
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
342
4
assert
test_codes
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_violations)
modified
3ce828b72f7821be82d310cab7f3be6a8210450472da07fb5f7db5c9b2bd8893
assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a...
len(all_violations)
341
4
wemake-services/wemake-python-styleguide
train
543
ba51ad44fb116e9e0bec9b81a2fb540048eb4080
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
427
4
assert
test_noqa_fixture_disabled_no_control
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_controlled_violations)
modified
68461c596f0410913c4aa52df776eaf057f2c94d3deda06d853fb1d2456cd775
assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st...
len(all_controlled_violations)
426
4
wemake-services/wemake-python-styleguide
train
543
ba51ad44fb116e9e0bec9b81a2fb540048eb4080
train
tests/test_visitors/test_ast/test_subscripts/test_consecutive_slices.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_subscripts/test_consecutive_slices.py
30
4
assert_*
test_forbidden_consecutive_slices
import pytest from wemake_python_styleguide.violations.best_practices import ( ConsecutiveSlicesViolation, ) from wemake_python_styleguide.visitors.ast.subscripts import SubscriptVisitor usage_template = 'constant[{0}]' @pytest.mark.parametrize('expression', [ 'a[1:][:3]', 'a[1:3][3:]', 'a[:][:]', ...
[ConsecutiveSlicesViolation])
added
0cfdfaa37bca2eb5ee654e42f1c55a12c338a90b56b707b9c2a686ebda205ffe
assert_*|test_forbidden_consecutive_slices|import pytest from wemake_python_styleguide.violations.best_practices import ( ConsecutiveSlicesViolation, ) from wemake_python_styleguide.visitors.ast.subscripts import SubscriptVisitor usage_template = 'constant[{0}]' @pytest.mark.parametrize('expression', [ 'a[1:][:3]', 'a[...
null
null
null
wemake-services/wemake-python-styleguide
train
543
ba51ad44fb116e9e0bec9b81a2fb540048eb4080
train
tests/test_visitors/test_ast/test_subscripts/test_consecutive_slices.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_subscripts/test_consecutive_slices.py
49
4
assert_*
test_forbidden_multiple_consecutive_slices
import pytest from wemake_python_styleguide.violations.best_practices import ( ConsecutiveSlicesViolation, ) from wemake_python_styleguide.visitors.ast.subscripts import SubscriptVisitor usage_template = 'constant[{0}]' @pytest.mark.parametrize('expression', [ 'a[1:][:3]', 'a[1:3][3:]', 'a[:][:]', ...
[ ConsecutiveSlicesViolation, ConsecutiveSlicesViolation, ])
added
c2e74cda08dbf72d46da8b2c53958acb2547f8991eec1cfce572022e2fc230c4
assert_*|test_forbidden_multiple_consecutive_slices|import pytest from wemake_python_styleguide.violations.best_practices import ( ConsecutiveSlicesViolation, ) from wemake_python_styleguide.visitors.ast.subscripts import SubscriptVisitor usage_template = 'constant[{0}]' @pytest.mark.parametrize('expression', [ 'a[1:][...
null
null
null
wemake-services/wemake-python-styleguide
train
544
e37b8ae1505ad8156a52165e958902850ef9c912
train
tests/test_visitors/test_ast/test_attributes/test_magic_attributes.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_attributes/test_magic_attributes.py
146
4
assert_*
test_disallowed_magic_attribute_is_restricted
import pytest from wemake_python_styleguide.violations.oop import ( DirectMagicAttributeAccessViolation, ) from wemake_python_styleguide.visitors.ast.attributes import ( WrongAttributeVisitor, ) # Wrong: magic_attribute_assigned = 'some.{0} = 1' magic_attribute_accessed = 'print(some.{0})' magic_method_calle...
[DirectMagicAttributeAccessViolation])
added
1d316ae9be56da22de15953d6a9759fa5a0f42e19a9ac5e54d7700316a8eb1e4
assert_*|test_disallowed_magic_attribute_is_restricted|import pytest from wemake_python_styleguide.violations.oop import ( DirectMagicAttributeAccessViolation, ) from wemake_python_styleguide.visitors.ast.attributes import ( WrongAttributeVisitor, ) # Wrong: magic_attribute_assigned = 'some.{0} = 1' magic_attribute_acc...
null
null
null
wemake-services/wemake-python-styleguide
train
544
e37b8ae1505ad8156a52165e958902850ef9c912
train
tests/test_visitors/test_ast/test_attributes/test_magic_attributes.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_attributes/test_magic_attributes.py
147
4
assert_*
test_disallowed_magic_attribute_is_restricted
import pytest from wemake_python_styleguide.violations.oop import ( DirectMagicAttributeAccessViolation, ) from wemake_python_styleguide.visitors.ast.attributes import ( WrongAttributeVisitor, ) # Wrong: magic_attribute_assigned = 'some.{0} = 1' magic_attribute_accessed = 'print(some.{0})' magic_method_calle...
attribute)
added
30fce28f16f26ba36844cbc430186fdf3a7e3cdf839ba9878c6b15fbd2770136
assert_*|test_disallowed_magic_attribute_is_restricted|import pytest from wemake_python_styleguide.violations.oop import ( DirectMagicAttributeAccessViolation, ) from wemake_python_styleguide.visitors.ast.attributes import ( WrongAttributeVisitor, ) # Wrong: magic_attribute_assigned = 'some.{0} = 1' magic_attribute_acc...
null
null
null
wemake-services/wemake-python-styleguide
train
545
63c7a2941bba747b8145582d670950ed189b7f3e
train
tests/test_transformations/test_enhancements.py
train
wemake-services/wemake-python-styleguide:tests/test_transformations/test_enhancements.py
24
4
assert
test_evaluate_valid_operations
import pytest @pytest.mark.parametrize(('expression', 'output'), [ ('-1 + 1', 0), ('1 * 2', 2), ('"a" * 5', 'aaaaa'), ('b"hello" * 2', b'hellohello'), ('"hello " + "world"', 'hello world'), ('(2 + 6) / 4 - 2', 0), ('1 << 4', 16), ('255 >> 4', 15), ('2**4', 16), ('5^9', 12), ...
output
added
4d0df19195fff10a4c6506c3d54a9ee9712f71d99d437e37d43b01ab7d5c6cc5
assert|test_evaluate_valid_operations|import pytest @pytest.mark.parametrize(('expression', 'output'), [ ('-1 + 1', 0), ('1 * 2', 2), ('"a" * 5', 'aaaaa'), ('b"hello" * 2', b'hellohello'), ('"hello " + "world"', 'hello world'), ('(2 + 6) / 4 - 2', 0), ('1 << 4', 16), ('255 >> 4', 15), ('2**4', 16), ('5^9', 12), ('12 & ...
null
null
null
wemake-services/wemake-python-styleguide
train
545
63c7a2941bba747b8145582d670950ed189b7f3e
train
tests/test_transformations/test_enhancements.py
train
wemake-services/wemake-python-styleguide:tests/test_transformations/test_enhancements.py
41
4
assert
test_evaluate_invalid_operations
import pytest @pytest.mark.parametrize(('expression', 'output'), [ ('-1 + 1', 0), ('1 * 2', 2), ('"a" * 5', 'aaaaa'), ('b"hello" * 2', b'hellohello'), ('"hello " + "world"', 'hello world'), ('(2 + 6) / 4 - 2', 0), ('1 << 4', 16), ('255 >> 4', 15), ('2**4', 16), ('5^9', 12), ...
None
added
d6df3bfecfc31923bc5f748e5f8144cc91077a81b02690a460fc31a9bb1c6542
assert|test_evaluate_invalid_operations|import pytest @pytest.mark.parametrize(('expression', 'output'), [ ('-1 + 1', 0), ('1 * 2', 2), ('"a" * 5', 'aaaaa'), ('b"hello" * 2', b'hellohello'), ('"hello " + "world"', 'hello world'), ('(2 + 6) / 4 - 2', 0), ('1 << 4', 16), ('255 >> 4', 15), ('2**4', 16), ('5^9', 12), ('12 ...
null
null
null
wemake-services/wemake-python-styleguide
train
545
63c7a2941bba747b8145582d670950ed189b7f3e
train
tests/test_visitors/test_ast/test_builtins/test_collection_hashes/test_float_keys.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_collection_hashes/test_float_keys.py
41
4
assert_*
test_dict_with_float_key
import pytest from wemake_python_styleguide.violations.best_practices import FloatKeyViolation from wemake_python_styleguide.visitors.ast.builtins import ( WrongCollectionVisitor, ) dict_template1 = '{{ {0}: 1 }}' dict_template2 = '{{ {0}: {0} }}' dict_template3 = '{{ {0}: 1, **kwargs }}' dict_template4 = '{{ {0}...
[FloatKeyViolation])
modified
d2e7c8e6e3c5f7e6270ec6c954492fc0061e4a089a59f52fab497695916b7636
assert_*|test_dict_with_float_key|import pytest from wemake_python_styleguide.violations.best_practices import FloatKeyViolation from wemake_python_styleguide.visitors.ast.builtins import ( WrongCollectionVisitor, ) dict_template1 = '{{ {0}: 1 }}' dict_template2 = '{{ {0}: {0} }}' dict_template3 = '{{ {0}: 1, **kwargs ...
[FloatKeyViolation])
38
4
wemake-services/wemake-python-styleguide
train
546
d27209b1120368cc9a0111f1f55f48a1592408a3
train
tests/test_visitors/conftest.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/conftest.py
39
8
assert
from typing import Optional, Sequence, Tuple, Type, Union import pytest from typing_extensions import Final from wemake_python_styleguide.violations.base import ( ASTViolation, BaseViolation, TokenizeViolation, ) from wemake_python_styleguide.visitors.base import BaseVisitor _IgnoredTypes = Union[ Ty...
len(real_errors)
modified
70acbd292ceff3b9197614de2da40495652a20a90db8a64bf614677f3ad01f96
assert||from typing import Optional, Sequence, Tuple, Type, Union import pytest from typing_extensions import Final from wemake_python_styleguide.violations.base import ( ASTViolation, BaseViolation, TokenizeViolation, ) from wemake_python_styleguide.visitors.base import BaseVisitor _IgnoredTypes = Union[ Type[BaseViol...
len(real_errors)
37
8
wemake-services/wemake-python-styleguide
train
546
d27209b1120368cc9a0111f1f55f48a1592408a3
train
tests/test_visitors/conftest.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/conftest.py
44
16
assert
from typing import Optional, Sequence, Tuple, Type, Union import pytest from typing_extensions import Final from wemake_python_styleguide.violations.base import ( ASTViolation, BaseViolation, TokenizeViolation, ) from wemake_python_styleguide.visitors.base import BaseVisitor _IgnoredTypes = Union[ Ty...
None
modified
e165c299d6a6beb3c0dec00ea7dad7d70044a506dc0d3ec6a86b011ecb3f70cd
assert||from typing import Optional, Sequence, Tuple, Type, Union import pytest from typing_extensions import Final from wemake_python_styleguide.violations.base import ( ASTViolation, BaseViolation, TokenizeViolation, ) from wemake_python_styleguide.visitors.base import BaseVisitor _IgnoredTypes = Union[ Type[BaseViol...
None
42
16
wemake-services/wemake-python-styleguide
train
546
d27209b1120368cc9a0111f1f55f48a1592408a3
train
tests/test_visitors/conftest.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/conftest.py
75
8
assert
from typing import Optional, Sequence, Tuple, Type, Union import pytest from typing_extensions import Final from wemake_python_styleguide.violations.base import ( ASTViolation, BaseViolation, TokenizeViolation, ) from wemake_python_styleguide.visitors.base import BaseVisitor _IgnoredTypes = Union[ Ty...
violation.error_template
modified
4a42c97a6f63d4612c24f96981829e7755fe894cbc3a1820b4ad260fc9e01f1a
assert||from typing import Optional, Sequence, Tuple, Type, Union import pytest from typing_extensions import Final from wemake_python_styleguide.violations.base import ( ASTViolation, BaseViolation, TokenizeViolation, ) from wemake_python_styleguide.visitors.base import BaseVisitor _IgnoredTypes = Union[ Type[BaseViol...
violation.error_template
74
8
wemake-services/wemake-python-styleguide
train
546
d27209b1120368cc9a0111f1f55f48a1592408a3
train
tests/test_visitors/conftest.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/conftest.py
76
8
assert
from typing import Optional, Sequence, Tuple, Type, Union import pytest from typing_extensions import Final from wemake_python_styleguide.violations.base import ( ASTViolation, BaseViolation, TokenizeViolation, ) from wemake_python_styleguide.visitors.base import BaseVisitor _IgnoredTypes = Union[ Ty...
violation.error_template.endswith(_ERROR_FORMAT)
modified
68ac0ee2fe3c348477e30769a2e467a3ea8d466e8380dc2ed66d4de3251ecf2e
assert||from typing import Optional, Sequence, Tuple, Type, Union import pytest from typing_extensions import Final from wemake_python_styleguide.violations.base import ( ASTViolation, BaseViolation, TokenizeViolation, ) from wemake_python_styleguide.visitors.base import BaseVisitor _IgnoredTypes = Union[ Type[BaseViol...
violation.error_template.endswith(error_format)
75
8
wemake-services/wemake-python-styleguide
train
547
e5589653baab32ff48197aad1ac23795004f914d
train
tests/test_visitors/test_ast/test_classes/test_getter_setter.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_getter_setter.py
225
4
assert_*
test_invalid_getter_and_setter
import pytest from wemake_python_styleguide.violations.oop import ( UnpythonicGetterSetterViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassBodyVisitor module_getter_and_setter = """ attribute = 1 def get_attribute(): ... def set_attribute(): ... """ static_getter_and_set...
[ UnpythonicGetterSetterViolation, UnpythonicGetterSetterViolation, ])
added
77b3b44cc00a3aef055c8ae297c30c83cfc12f2958b3a2b58f24bafc453b2637
assert_*|test_invalid_getter_and_setter|import pytest from wemake_python_styleguide.violations.oop import ( UnpythonicGetterSetterViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassBodyVisitor module_getter_and_setter = """ attribute = 1 def get_attribute(): ... def set_attribute(): ... ""...
null
null
null
wemake-services/wemake-python-styleguide
train
547
e5589653baab32ff48197aad1ac23795004f914d
train
tests/test_visitors/test_ast/test_classes/test_getter_setter.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_getter_setter.py
303
4
assert_*
test_instance_getter_setter
import pytest from wemake_python_styleguide.violations.oop import ( UnpythonicGetterSetterViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassBodyVisitor module_getter_and_setter = """ attribute = 1 def get_attribute(): ... def set_attribute(): ... """ static_getter_and_set...
[UnpythonicGetterSetterViolation])
added
addb3ecda0074b7b375275d0a16c553f34024f6ae31da9a4e9017cc579b3cc0a
assert_*|test_instance_getter_setter|import pytest from wemake_python_styleguide.violations.oop import ( UnpythonicGetterSetterViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassBodyVisitor module_getter_and_setter = """ attribute = 1 def get_attribute(): ... def set_attribute(): ... """ s...
null
null
null
wemake-services/wemake-python-styleguide
train
547
e5589653baab32ff48197aad1ac23795004f914d
train
tests/test_visitors/test_ast/test_classes/test_getter_setter.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_getter_setter.py
377
4
assert_*
test_class_attributes_getter_setter
import pytest from wemake_python_styleguide.violations.oop import ( UnpythonicGetterSetterViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassBodyVisitor module_getter_and_setter = """ attribute = 1 def get_attribute(): ... def set_attribute(): ... """ static_getter_and_set...
[UnpythonicGetterSetterViolation])
added
5c8cdd70ad814a9ca48f7b94c0f02488b9e6ecb0e87e39e794dabe3e94703f3b
assert_*|test_class_attributes_getter_setter|import pytest from wemake_python_styleguide.violations.oop import ( UnpythonicGetterSetterViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassBodyVisitor module_getter_and_setter = """ attribute = 1 def get_attribute(): ... def set_attribute(): ....
null
null
null
wemake-services/wemake-python-styleguide
train
548
9faaef0292eeaf1b48fb0c3a50bb9b4db4875d07
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
330
12
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
4832d7bc1b15855d9605029eaae7cc64e27ce2f2c520cbec394f858839060980
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
329
12
wemake-services/wemake-python-styleguide
train
548
9faaef0292eeaf1b48fb0c3a50bb9b4db4875d07
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
343
4
assert
test_codes
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_violations)
modified
b051c03ffb29d54a895816be988e2b37cc5b193654fcccac5f7e3f06a243a75b
assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a...
len(all_violations)
342
4
wemake-services/wemake-python-styleguide
train
548
9faaef0292eeaf1b48fb0c3a50bb9b4db4875d07
train
tests/test_violations/test_codes.py
train
wemake-services/wemake-python-styleguide:tests/test_violations/test_codes.py
7
4
assert
test_all_unique_violation_codes
from collections import Counter def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [int(violation.code) for violation in all_violations] assert len(set(codes)) ==
len(all_violations)
modified
274653b77f20e7e3aa75189aa8b003f46c988088c5a1da433b9b036d7e6b8637
assert|test_all_unique_violation_codes|from collections import Counter def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [int(violation.code) for violation in all_violations] assert len(set(codes)) ==
len(all_violations)
5
4
wemake-services/wemake-python-styleguide
train
548
9faaef0292eeaf1b48fb0c3a50bb9b4db4875d07
train
tests/test_violations/test_codes.py
train
wemake-services/wemake-python-styleguide:tests/test_violations/test_codes.py
39
8
assert
test_violations_start_zero
from collections import Counter def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [int(violation.code) for violation in all_violations] assert len(set(codes)) == len(all_violations) def test_all_unique_violation_messages(all_viola...
index * 100
added
3fe43b473345fb165c0385b973f08ea20305e11b7190eda15c21f793214e1b8b
assert|test_violations_start_zero|from collections import Counter def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [int(violation.code) for violation in all_violations] assert len(set(codes)) == len(all_violations) def test_all_unique_violation_...
null
null
null
wemake-services/wemake-python-styleguide
train
548
9faaef0292eeaf1b48fb0c3a50bb9b4db4875d07
train
tests/test_violations/test_codes.py
train
wemake-services/wemake-python-styleguide:tests/test_violations/test_codes.py
49
16
assert
test_no_holes
from collections import Counter def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [int(violation.code) for violation in all_violations] assert len(set(codes)) == len(all_violations) def test_all_unique_violation_messages(all_viola...
diff == 1 or diff > 2
added
00909083aeaa2c9689c1b37ba1e7f57f4e033422c7f87ea4a520561971c92032
assert|test_no_holes|from collections import Counter def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [int(violation.code) for violation in all_violations] assert len(set(codes)) == len(all_violations) def test_all_unique_violation_messages(all_...
null
null
null
wemake-services/wemake-python-styleguide
train
548
9faaef0292eeaf1b48fb0c3a50bb9b4db4875d07
train
tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_rules.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_rules.py
226
4
assert_*
test_multiple_assignments
import pytest from wemake_python_styleguide.violations.best_practices import ( GettingElementByUnpackingViolation, SingleElementDestructuringViolation, WrongUnpackingViolation, ) from wemake_python_styleguide.violations.consistency import ( UnpackingIterableToListViolation, ) from wemake_python_stylegu...
[WrongUnpackingViolation])
modified
5b9260cd2785984ff721d139954f456b3c3451558f692821cd0fd015fbf03917
assert_*|test_multiple_assignments|import pytest from wemake_python_styleguide.violations.best_practices import ( GettingElementByUnpackingViolation, SingleElementDestructuringViolation, WrongUnpackingViolation, ) from wemake_python_styleguide.violations.consistency import ( UnpackingIterableToListViolation, ) from wem...
[WrongUnpackingViolation])
224
4
wemake-services/wemake-python-styleguide
train
548
9faaef0292eeaf1b48fb0c3a50bb9b4db4875d07
train
tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_rules.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_rules.py
274
4
assert_*
test_single_element_destructing
import pytest from wemake_python_styleguide.violations.best_practices import ( GettingElementByUnpackingViolation, SingleElementDestructuringViolation, WrongUnpackingViolation, ) from wemake_python_styleguide.violations.consistency import ( UnpackingIterableToListViolation, ) from wemake_python_stylegu...
[SingleElementDestructuringViolation])
modified
ee54a3a88ef156fb0390d2afb098250f57c0cb3c33f9c3b247420fddf7c36714
assert_*|test_single_element_destructing|import pytest from wemake_python_styleguide.violations.best_practices import ( GettingElementByUnpackingViolation, SingleElementDestructuringViolation, WrongUnpackingViolation, ) from wemake_python_styleguide.violations.consistency import ( UnpackingIterableToListViolation, ) fr...
[SingleElementDestructuringViolation])
272
4
wemake-services/wemake-python-styleguide
train
548
9faaef0292eeaf1b48fb0c3a50bb9b4db4875d07
train
tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_rules.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_rules.py
302
4
assert_*
test_element_getting_by_unpacking
import pytest from wemake_python_styleguide.violations.best_practices import ( GettingElementByUnpackingViolation, SingleElementDestructuringViolation, WrongUnpackingViolation, ) from wemake_python_styleguide.violations.consistency import ( UnpackingIterableToListViolation, ) from wemake_python_stylegu...
[GettingElementByUnpackingViolation])
added
9fe5647a0bf4144345571322757ba71c1c092a786dff7b979b658acc866c6d19
assert_*|test_element_getting_by_unpacking|import pytest from wemake_python_styleguide.violations.best_practices import ( GettingElementByUnpackingViolation, SingleElementDestructuringViolation, WrongUnpackingViolation, ) from wemake_python_styleguide.violations.consistency import ( UnpackingIterableToListViolation, ) ...
null
null
null
wemake-services/wemake-python-styleguide
train
549
a203c25ee35a40f062e5f7a40ceaa8a1b0e787dc
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
330
12
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
7fd0b811c05a7ef591c44928a91d743c50dbb344a69d410ce6590c4539d8ec38
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
330
12
wemake-services/wemake-python-styleguide
train
549
a203c25ee35a40f062e5f7a40ceaa8a1b0e787dc
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
334
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors.get(found_error)
modified
89f83eca499ff8b758d84ff4a143f86ca42bb12c895854089169cbf9741bfee2
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors.get(found_error)
334
8
wemake-services/wemake-python-styleguide
train
549
a203c25ee35a40f062e5f7a40ceaa8a1b0e787dc
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
343
4
assert
test_codes
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_violations)
modified
0174c7bc1f8323724b99dffe33a8ab411a1f89d9240a86f7a97de3df6965aa15
assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a...
len(all_violations)
343
4
wemake-services/wemake-python-styleguide
train
549
a203c25ee35a40f062e5f7a40ceaa8a1b0e787dc
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
428
4
assert
test_noqa_fixture_disabled_no_control
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_controlled_violations)
modified
5b803ec4f4ff61b2632aa4a3c89ab72703b3bd8ff6913ab691fd3955b0bf7ffd
assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st...
len(all_controlled_violations)
428
4
wemake-services/wemake-python-styleguide
train
549
a203c25ee35a40f062e5f7a40ceaa8a1b0e787dc
train
tests/test_visitors/test_ast/test_complexity/test_counts/test_output_length.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_output_length.py
74
4
assert_*
test_output_length_violation
import pytest from wemake_python_styleguide.constants import MAX_LEN_TUPLE_OUTPUT from wemake_python_styleguide.violations.complexity import ( TooLongOutputTupleViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( ReturnLikeStatementTupleVisitor, ) RETURN_LIKE_STATEMENTS = ('retu...
[TooLongOutputTupleViolation])
added
b10caee955772fa31b67e9ea66d4f0580917ace5da0fa46d59bdb78d38bc9efc
assert_*|test_output_length_violation|import pytest from wemake_python_styleguide.constants import MAX_LEN_TUPLE_OUTPUT from wemake_python_styleguide.violations.complexity import ( TooLongOutputTupleViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( ReturnLikeStatementTupleVisitor, ) RET...
null
null
null
wemake-services/wemake-python-styleguide
train
549
a203c25ee35a40f062e5f7a40ceaa8a1b0e787dc
train
tests/test_visitors/test_ast/test_complexity/test_counts/test_output_length.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_output_length.py
75
4
assert_*
test_output_length_violation
import pytest from wemake_python_styleguide.constants import MAX_LEN_TUPLE_OUTPUT from wemake_python_styleguide.violations.complexity import ( TooLongOutputTupleViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( ReturnLikeStatementTupleVisitor, ) RETURN_LIKE_STATEMENTS = ('retu...
MAX_LEN_TUPLE_OUTPUT)
added
294f823efd02e09dbcca598885ac9ad5cd0441faf64dbb1f6f635948943a1bad
assert_*|test_output_length_violation|import pytest from wemake_python_styleguide.constants import MAX_LEN_TUPLE_OUTPUT from wemake_python_styleguide.violations.complexity import ( TooLongOutputTupleViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( ReturnLikeStatementTupleVisitor, ) RET...
null
null
null