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
271
f18294ea9828b78d2fe80d66f33efdacf763d2ce
train
tests/fixtures/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py
156
4
assert
# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ...
test_function(4)
added
86e71ac06d5da5b5d3a92d908388ea8e58d2457f40bb894a8d34a510d48db2d1
assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ful...
null
null
null
wemake-services/wemake-python-styleguide
train
271
f18294ea9828b78d2fe80d66f33efdacf763d2ce
train
tests/fixtures/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py
158
4
assert
# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ...
test_function(6)
added
f03f190b21b27953dad0854b2a39a515ce173cbf89a2072eb17d43266a465468
assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ful...
null
null
null
wemake-services/wemake-python-styleguide
train
271
f18294ea9828b78d2fe80d66f33efdacf763d2ce
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
211
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
b5565b2872b097b98a04e53c9df0fee78b8b7d2c50b2b482096dc67b05c88984
assert||# -*- coding: utf-8 -*- """ 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/...
errors
210
8
wemake-services/wemake-python-styleguide
train
271
f18294ea9828b78d2fe80d66f33efdacf763d2ce
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
215
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors.get(found_error)
modified
1d65dcde7cc2060cd9032b2d069ac39dc738f0487930b93927bb94a912616879
assert||# -*- coding: utf-8 -*- """ 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/...
errors.get(found_error)
214
8
wemake-services/wemake-python-styleguide
train
271
f18294ea9828b78d2fe80d66f33efdacf763d2ce
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
243
4
assert
test_noqa_fixture_disabled
# -*- coding: utf-8 -*- """ 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/late...
len(all_violations)
modified
d35d32110296a4e1d53fff0c1ede5281d5d56ce4c34ce136f816e03eae3709a4
assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ 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://wem...
len(all_violations)
242
4
wemake-services/wemake-python-styleguide
train
271
f18294ea9828b78d2fe80d66f33efdacf763d2ce
train
tests/test_visitors/test_ast/test_complexity/test_classes/test_public_attrs_count.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_classes/test_public_attrs_count.py
92
4
assert_*
test_wrong_attributes_count
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooManyPublicAttributesViolation, ) from wemake_python_styleguide.visitors.ast.complexity.classes import ( ClassComplexityVisitor, ) class_template = """ class Test(object): def __init__(self): {0} ...
[TooManyPublicAttributesViolation])
added
e9086577f594ef0bc82de5e6dc5b7ecad4ed14ae8e2dfdee864a86d8e02f7354
assert_*|test_wrong_attributes_count|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooManyPublicAttributesViolation, ) from wemake_python_styleguide.visitors.ast.complexity.classes import ( ClassComplexityVisitor, ) class_template = """ class Test(object): def __init...
null
null
null
wemake-services/wemake-python-styleguide
train
272
41792847f6147abff85f8a5c0b7750770e8168e5
train
tests/test_visitors/test_ast/test_complexity/test_classes/test_public_attrs_count.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_classes/test_public_attrs_count.py
95
4
assert_*
test_wrong_attributes_count
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooManyPublicAttributesViolation, ) from wemake_python_styleguide.visitors.ast.complexity.classes import ( ClassComplexityVisitor, ) class_template = """ class Test(object): def __init__(self): {0} ...
[TooManyPublicAttributesViolation])
modified
ef8df8780622239ed7243044c0420e54bc3088f792893a6a65ba4f15118b4cf5
assert_*|test_wrong_attributes_count|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooManyPublicAttributesViolation, ) from wemake_python_styleguide.visitors.ast.complexity.classes import ( ClassComplexityVisitor, ) class_template = """ class Test(object): def __init...
[TooManyPublicAttributesViolation])
92
4
wemake-services/wemake-python-styleguide
train
273
84696bfe12537ae2a8c1d78dc2cbd2d69b388132
train
tests/test_visitors/test_ast/test_conditions/test_returning_else/test_redundant_returning_else.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_returning_else/test_redundant_returning_else.py
90
4
assert_*
test_else_that_can_be_removed_in_function
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor function_level_condition = """ def function(): if some_condition: {0} else: ...
[UselessReturningElseViolation])
added
084cc9f115336c3ce01e7667b2b230efabbe0418f8d31cf66d87f2b533fa2a24
assert_*|test_else_that_can_be_removed_in_function|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor function_level_condition = """ def function(): if some_c...
null
null
null
wemake-services/wemake-python-styleguide
train
273
84696bfe12537ae2a8c1d78dc2cbd2d69b388132
train
tests/test_visitors/test_ast/test_conditions/test_returning_else/test_redundant_returning_else.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_returning_else/test_redundant_returning_else.py
116
4
assert_*
test_else_that_can_be_removed_in_loop
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor function_level_condition = """ def function(): if some_condition: {0} else: ...
[UselessReturningElseViolation])
added
013cf14e41e9bf90fafa1e903bc0c82b47a90c94bb05da5213ad01b577841fa2
assert_*|test_else_that_can_be_removed_in_loop|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor function_level_condition = """ def function(): if some_condi...
null
null
null
wemake-services/wemake-python-styleguide
train
273
84696bfe12537ae2a8c1d78dc2cbd2d69b388132
train
tests/test_visitors/test_ast/test_conditions/test_returning_else/test_redundant_returning_else.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_returning_else/test_redundant_returning_else.py
138
4
assert_*
test_else_that_can_be_removed_in_module
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor function_level_condition = """ def function(): if some_condition: {0} else: ...
[UselessReturningElseViolation])
added
3f0ba39ae30c7c520ba9e8cfbc5ac94bf17dd2f40c6302c728bbfc254e218fdc
assert_*|test_else_that_can_be_removed_in_module|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor function_level_condition = """ def function(): if some_con...
null
null
null
wemake-services/wemake-python-styleguide
train
273
84696bfe12537ae2a8c1d78dc2cbd2d69b388132
train
tests/test_visitors/test_tokenize/test_comments/test_noqa_comment.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_noqa_comment.py
63
4
assert_*
test_incorrect_noqa_comment
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongMagicCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import ( WrongCommentVisitor, ) @pytest.mark.parametrize('code', [ 'x = 10_00 # noqa: WPS002,Z114', 'x = 10_0...
[WrongMagicCommentViolation])
modified
50764693e08e2f3369d1bbc2432cf2b8d648791f4f0d66e295fe7ec441571319
assert_*|test_incorrect_noqa_comment|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongMagicCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import ( WrongCommentVisitor, ) @pytest.mark.parametrize('code', [ 'x = 10_00 # noqa: WPS002,...
[WrongMagicCommentViolation])
63
4
wemake-services/wemake-python-styleguide
train
274
d0eea9a69d08fe96730884efbe5fbc0ae18ff2df
train
tests/test_visitors/test_ast/test_compares/test_unpythonic/test_useless_len.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_unpythonic/test_useless_len.py
41
4
assert_*
test_useless_len_call
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( UselessLenCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import CompareSanityVisitor @pytest.mark.parametrize('code', [ 'len(some) > 0', 'len(some) >= 0', 'len(some) != 0', ...
[UselessLenCompareViolation])
modified
98662ad893802b244491320d3d91a7ccc83653969dda5a6b5d6945ab69016563
assert_*|test_useless_len_call|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( UselessLenCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import CompareSanityVisitor @pytest.mark.parametrize('code', [ 'len(some) > 0', 'len(some) >= 0', 'len(some...
[UselessLenCompareViolation])
39
4
wemake-services/wemake-python-styleguide
train
275
c47b828aedbfe596d5d71ca4da5844efeaff9c6c
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
127
4
assert_*
test_wrong_return_statement
# -*- coding: utf-8 -*- 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 = """ ...
[InconsistentReturnViolation])
added
6e8fe2ce888eb4cb2ef0aacbd8720d8f1341bf88e03e7bbcff2e1db877bdda98
assert_*|test_wrong_return_statement|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): ... """ cor...
null
null
null
wemake-services/wemake-python-styleguide
train
275
c47b828aedbfe596d5d71ca4da5844efeaff9c6c
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
147
4
assert_*
test_douple_wrong_return_statement
# -*- coding: utf-8 -*- 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 = """ ...
[ InconsistentReturnViolation, InconsistentReturnViolation, ])
added
bc8727cd53f240c0bc7c88d5aadb666a2d8ad9e08f477272cb081c2a18699728
assert_*|test_douple_wrong_return_statement|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): ... ...
null
null
null
wemake-services/wemake-python-styleguide
train
276
a31944d1d302b41b7029abf98ade45f8b4489710
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
134
4
assert_*
test_wrong_return_statement
# -*- coding: utf-8 -*- 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 = """ ...
[InconsistentReturnViolation])
added
98a3777f80a591dc98b7864df9c7992301cd08a65e75a3ab1db4f06ad514296f
assert_*|test_wrong_return_statement|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): ... """ cor...
null
null
null
wemake-services/wemake-python-styleguide
train
276
a31944d1d302b41b7029abf98ade45f8b4489710
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
154
4
assert_*
test_douple_wrong_return_statement
# -*- coding: utf-8 -*- 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 = """ ...
[ InconsistentReturnViolation, InconsistentReturnViolation, ])
added
150f1249104a27d9b589827ef6e65ebb27d05f8a24caf5a82ba5cf1bcf1104ac
assert_*|test_douple_wrong_return_statement|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): ... ...
null
null
null
wemake-services/wemake-python-styleguide
train
278
80b8fe49a79e1b349234f1420432cff006122aa8
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
212
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
b959652aeffe5bc10acadcc32e182dd82991b6ddf68c933a94659eb6bb6b9eef
assert||# -*- coding: utf-8 -*- """ 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/...
errors
211
8
wemake-services/wemake-python-styleguide
train
278
80b8fe49a79e1b349234f1420432cff006122aa8
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
215
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
2b96ea4875bfd69b1fc6fb872d06bd88bda5adfa14279be99531a91a502a0b9d
assert||# -*- coding: utf-8 -*- """ 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/...
errors
214
8
wemake-services/wemake-python-styleguide
train
278
80b8fe49a79e1b349234f1420432cff006122aa8
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
216
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors.get(found_error)
modified
bf043104b1d3ac4ca169d7c176b45b92d814cdfab0de6d1e380856940d91aca8
assert||# -*- coding: utf-8 -*- """ 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/...
errors.get(found_error)
215
8
wemake-services/wemake-python-styleguide
train
278
80b8fe49a79e1b349234f1420432cff006122aa8
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
244
4
assert
test_noqa_fixture_disabled
# -*- coding: utf-8 -*- """ 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/late...
len(all_violations)
modified
3e4c494f801e0c7416ed844cf107aa33cfe705d6d8f4157bea1afa3d8e5079df
assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ 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://wem...
len(all_violations)
243
4
wemake-services/wemake-python-styleguide
train
278
80b8fe49a79e1b349234f1420432cff006122aa8
train
tests/test_visitors/test_ast/test_statements/test_pointless_starred.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_pointless_starred.py
35
4
assert_*
test_pointless_starred_arg
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( PointlessStarredViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( PointlessStarredVisitor, ) @pytest.mark.parametrize('code', [ 'print(*[])', 'print(*())', 'print(*{})', ...
[PointlessStarredViolation])
added
ba802c04382b4b7f488c78df6a311759338855a39fe748d2cbad6c682201a724
assert_*|test_pointless_starred_arg|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( PointlessStarredViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( PointlessStarredVisitor, ) @pytest.mark.parametrize('code', [ 'print(*[])', 'print(*())', 'p...
null
null
null
wemake-services/wemake-python-styleguide
train
278
80b8fe49a79e1b349234f1420432cff006122aa8
train
tests/test_visitors/test_ast/test_statements/test_pointless_starred.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_pointless_starred.py
56
4
assert_*
test_pointless_starred_arg_and_keyword
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( PointlessStarredViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( PointlessStarredVisitor, ) @pytest.mark.parametrize('code', [ 'print(*[])', 'print(*())', 'print(*{})', ...
[PointlessStarredViolation, PointlessStarredViolation])
added
d8eb96a4feff06eb47bf7a5c3af196911b609dd77475c9d9ff3b9e71b41701ad
assert_*|test_pointless_starred_arg_and_keyword|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( PointlessStarredViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( PointlessStarredVisitor, ) @pytest.mark.parametrize('code', [ 'print(*[])', 'pri...
null
null
null
wemake-services/wemake-python-styleguide
train
279
8e759c1e80370234ac7bb30cf5f97fc953841688
train
tests/test_visitors/test_ast/test_complexity/test_counts/test_try_body_length.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_try_body_length.py
96
4
assert_*
test_try_body_count_default
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooLongTryBodyViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( TryExceptVisitor, ) try_without_except = """ try: {0} finally: ... """ simple_try_except = """ try: ...
[TooLongTryBodyViolation])
modified
d63f3a7a254cdb2bdcb0b1a153f2371397c843f9992c5f0a7604486e08977986
assert_*|test_try_body_count_default|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooLongTryBodyViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( TryExceptVisitor, ) try_without_except = """ try: {0} finally: ... """ simple_try_excep...
[TooLongTryBodyViolation])
96
4
wemake-services/wemake-python-styleguide
train
280
f5447577113bd4c7c397a0e7970a62908bd11f73
train
tests/test_checker/test_module_names.py
train
wemake-services/wemake-python-styleguide:tests/test_checker/test_module_names.py
31
4
assert
test_module_names
# -*- coding: utf-8 -*- import ast import pytest from wemake_python_styleguide.checker import Checker from wemake_python_styleguide.violations import naming @pytest.mark.parametrize(('filename', 'error'), [ ('__magic__.py', naming.WrongModuleMagicNameViolation), ('util.py', naming.WrongModuleNameViolation)...
error.code
modified
756a22f19319a2c5a31a0f04241070a931a5306527769e8660e6e00db2e6b2a9
assert|test_module_names|# -*- coding: utf-8 -*- import ast import pytest from wemake_python_styleguide.checker import Checker from wemake_python_styleguide.violations import naming @pytest.mark.parametrize(('filename', 'error'), [ ('__magic__.py', naming.WrongModuleMagicNameViolation), ('util.py', naming.WrongModuleNa...
error.code
31
4
wemake-services/wemake-python-styleguide
train
280
f5447577113bd4c7c397a0e7970a62908bd11f73
train
tests/test_visitors/test_ast/test_builtins/test_collection_hashes/test_hash_elements.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_collection_hashes/test_hash_elements.py
174
4
assert_*
test_set_with_similar_values
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( NonUniqueItemsInHashViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongCollectionVisitor, ) set_literal_template = '{{{0}, {1}}}' nested_set_template = """ {{ *{{ {0}...
[NonUniqueItemsInHashViolation])
modified
faa2ad402735fa8b6ae63cd3a72d1b81f287110713635954c73e3bd56788c46d
assert_*|test_set_with_similar_values|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( NonUniqueItemsInHashViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongCollectionVisitor, ) set_literal_template = '{{{0}, {1}}}' nested_set_template =...
[NonUniqueItemsInHashViolation])
174
4
wemake-services/wemake-python-styleguide
train
280
f5447577113bd4c7c397a0e7970a62908bd11f73
train
tests/test_visitors/test_ast/test_classes/test_method_order.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_method_order.py
113
4
assert_*
test_incorrect_method_order
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( WrongMethodOrderViolation, ) from wemake_python_styleguide.visitors.ast.classes import ( ClassMethodOrderVisitor, ) correct_method_order = """ class Test(object): def __new__(self): ... def __...
[WrongMethodOrderViolation])
modified
d11c5bb8ff45d6b31b45a2cb5530495ced4155b1461536c720c6990694be9505
assert_*|test_incorrect_method_order|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( WrongMethodOrderViolation, ) from wemake_python_styleguide.visitors.ast.classes import ( ClassMethodOrderVisitor, ) correct_method_order = """ class Test(object): def __new__(self): ....
[WrongMethodOrderViolation])
113
4
wemake-services/wemake-python-styleguide
train
280
f5447577113bd4c7c397a0e7970a62908bd11f73
train
tests/test_visitors/test_ast/test_complexity/test_access/test_access.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_access/test_access.py
73
4
assert_*
test_incorrect_access
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooDeepAccessViolation, ) from wemake_python_styleguide.visitors.ast.complexity.access import ( AccessVisitor, ) # boundary expressions subscript_access = 'my_matrix[0][0][0][0]' attribute_access = 'self.attr.i...
str(access_level))
modified
c34937951e598cabc75df475722b28d612e154e451b3ef2b86c70b4834264629
assert_*|test_incorrect_access|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooDeepAccessViolation, ) from wemake_python_styleguide.visitors.ast.complexity.access import ( AccessVisitor, ) # boundary expressions subscript_access = 'my_matrix[0][0][0][0]' attribute_a...
str(access_level))
73
4
wemake-services/wemake-python-styleguide
train
280
f5447577113bd4c7c397a0e7970a62908bd11f73
train
tests/test_visitors/test_ast/test_complexity/test_jones/test_line_complexity.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_jones/test_line_complexity.py
108
4
assert_*
test_complex_lines
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.jones import ( JonesComplexityVisitor, LineComplexityViolation, ) line_simple = 'x = 2' line_with_types = 'x: int = 2' line_with_comprehension = 'x = [f for f in "abc"]' line_with_math = 'x = y * 2 + 19 / 9.3' line_in...
[LineComplexityViolation])
modified
1b7f9e7f6dc1df2cc46938573b0bec840f88c8cba0aff4786b97c65f0701584c
assert_*|test_complex_lines|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.jones import ( JonesComplexityVisitor, LineComplexityViolation, ) line_simple = 'x = 2' line_with_types = 'x: int = 2' line_with_comprehension = 'x = [f for f in "abc"]' line_with_math = 'x = y * 2 + ...
[LineComplexityViolation])
108
4
wemake-services/wemake-python-styleguide
train
280
f5447577113bd4c7c397a0e7970a62908bd11f73
train
tests/test_visitors/test_ast/test_complexity/test_offset_visitor.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_offset_visitor.py
187
4
assert_*
test_real_nesting_config
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.offset import ( OffsetVisitor, TooDeepNestingViolation, ) nested_if = """ def container(): if True: x = 1 """ nested_if2 = """ def container(): if some_value: call_other() """ nested_for = ""...
[TooDeepNestingViolation])
modified
7b1e0a8bd35d92f641ed9f22e113a548381a24b78eaa6fec99b88e39d90c7078
assert_*|test_real_nesting_config|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.offset import ( OffsetVisitor, TooDeepNestingViolation, ) nested_if = """ def container(): if True: x = 1 """ nested_if2 = """ def container(): if some_value: call_other() """ nested_for = """ d...
[TooDeepNestingViolation])
187
4
wemake-services/wemake-python-styleguide
train
280
f5447577113bd4c7c397a0e7970a62908bd11f73
train
tests/test_visitors/test_ast/test_conditions/test_implicit_in.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_implicit_in.py
104
4
assert_*
test_wrong_patterns_in_values
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( ImplicitInConditionViolation, ) from wemake_python_styleguide.visitors.ast.conditions import ( ImplicitBoolPatternsVisitor, ) # Correct: eq_and = '{0} == some1 and {1} == some2' noteq_or = '{0} != some1 or {1...
[ImplicitInConditionViolation])
modified
3b421f629b1cb09d95d8eda2612d2178f535d858c326369529fd337142b20f6d
assert_*|test_wrong_patterns_in_values|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( ImplicitInConditionViolation, ) from wemake_python_styleguide.visitors.ast.conditions import ( ImplicitBoolPatternsVisitor, ) # Correct: eq_and = '{0} == some1 and {1} == some2' not...
[ImplicitInConditionViolation])
104
4
wemake-services/wemake-python-styleguide
train
280
f5447577113bd4c7c397a0e7970a62908bd11f73
train
tests/test_visitors/test_ast/test_conditions/test_implicit_ternary.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_implicit_ternary.py
55
4
assert_*
test_implicit_ternary
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitTernaryViolation, ) from wemake_python_styleguide.visitors.ast.conditions import ( ImplicitBoolPatternsVisitor, ) # Correct: not_ternary1 = 'cond() and {0} and {1}' not_ternary2 = 'cond() or {0} and {...
[ImplicitTernaryViolation])
modified
124974881a5945622f94a723d8dc0434482655dd351133fd36d79c41c24a9aaa
assert_*|test_implicit_ternary|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitTernaryViolation, ) from wemake_python_styleguide.visitors.ast.conditions import ( ImplicitBoolPatternsVisitor, ) # Correct: not_ternary1 = 'cond() and {0} and {1}' not_ternary2 = '...
[ImplicitTernaryViolation])
55
4
wemake-services/wemake-python-styleguide
train
281
e6dd86df5a3763eae8a7c3e4b3824db8797ea549
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
213
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
9eaa00a03162d5b7d8a6c5264f5b1909afabd6db0d621bf2859036a8e71a6e69
assert||# -*- coding: utf-8 -*- """ 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/...
errors
212
8
wemake-services/wemake-python-styleguide
train
281
e6dd86df5a3763eae8a7c3e4b3824db8797ea549
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
216
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
fca621ca78b0eea42157d359b533cb5d2f18e59fb5f434f665ea1d6fde2c5406
assert||# -*- coding: utf-8 -*- """ 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/...
errors
215
8
wemake-services/wemake-python-styleguide
train
281
e6dd86df5a3763eae8a7c3e4b3824db8797ea549
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
217
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors.get(found_error)
modified
8cdbcc7b1404b70fea192f2332fd2255d3ce8405829a9902288dc9b0993322ac
assert||# -*- coding: utf-8 -*- """ 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/...
errors.get(found_error)
216
8
wemake-services/wemake-python-styleguide
train
281
e6dd86df5a3763eae8a7c3e4b3824db8797ea549
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
245
4
assert
test_noqa_fixture_disabled
# -*- coding: utf-8 -*- """ 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/late...
len(all_violations)
modified
05d9bb93346cb8251b0111a5bae138f66e3c3d56b2d3214c1ca8b32893f15c12
assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ 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://wem...
len(all_violations)
244
4
wemake-services/wemake-python-styleguide
train
281
e6dd86df5a3763eae8a7c3e4b3824db8797ea549
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
58
4
assert_*
test_range_len
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( ImplicitEnumerateViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( WrongFunctionCallContextVisitior, ) @pytest.mark.parametrize('code', [ 'range(10)', 'range(10, 20)', 'ra...
[ImplicitEnumerateViolation])
added
9481c1409d06c9ee9f39ff08cc9065e652cb81b3e3560655a1d2b09ea8bfac9a
assert_*|test_range_len|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( ImplicitEnumerateViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( WrongFunctionCallContextVisitior, ) @pytest.mark.parametrize('code', [ 'range(10)', 'range(10, 20)', 'ra...
null
null
null
wemake-services/wemake-python-styleguide
train
282
f41ddbeb3bda40c39ae00c2e7b21a659baef723d
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
214
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
11f796a815c85a537137fef1413b37738a6b25d7c7009217188178eccedb7e28
assert||# -*- coding: utf-8 -*- """ 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/...
errors
213
8
wemake-services/wemake-python-styleguide
train
282
f41ddbeb3bda40c39ae00c2e7b21a659baef723d
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
217
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
f81061ff98fe29e82a0f336f5bb1dd9d1ea80192a9a7ec5e3b3449ca550d1cab
assert||# -*- coding: utf-8 -*- """ 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/...
errors
216
8
wemake-services/wemake-python-styleguide
train
282
f41ddbeb3bda40c39ae00c2e7b21a659baef723d
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
218
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors.get(found_error)
modified
a269eded50a956fc2bb5feb6a77bfc06059a5e9350f628c7d3d011eab96bdcca
assert||# -*- coding: utf-8 -*- """ 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/...
errors.get(found_error)
217
8
wemake-services/wemake-python-styleguide
train
282
f41ddbeb3bda40c39ae00c2e7b21a659baef723d
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
246
4
assert
test_noqa_fixture_disabled
# -*- coding: utf-8 -*- """ 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/late...
len(all_violations)
modified
2a670cd098a7db4ea9f495a59dbdeb6b6c4b8666ef0cd3ca69eb75de25db0eb4
assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ 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://wem...
len(all_violations)
245
4
wemake-services/wemake-python-styleguide
train
282
f41ddbeb3bda40c39ae00c2e7b21a659baef723d
train
tests/test_visitors/test_ast/test_loops/test_loops/test_loop_sum.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_loops/test_loop_sum.py
48
4
assert_*
test_implicit_sum
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( ImplicitSumViolation, ) from wemake_python_styleguide.visitors.ast.loops import ( WrongLoopDefinitionVisitor, ) for_loop_template = """ def function(): value = 0 for index in some: {0} """ @p...
[ImplicitSumViolation])
added
00e7b9329f1f8a4212dd11fa8e4615d197bc7b81c285a5c82beb6881f7cff856
assert_*|test_implicit_sum|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( ImplicitSumViolation, ) from wemake_python_styleguide.visitors.ast.loops import ( WrongLoopDefinitionVisitor, ) for_loop_template = """ def function(): value = 0 for index in some: {0} """ @pyt...
null
null
null
wemake-services/wemake-python-styleguide
train
283
3c1f4819bfe3fdb11c731856a0eaf54adb027da8
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
215
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
c26e91ae64d99b392d54e28008ffd990309b009a1d4acb2578f7770d63fc4411
assert||# -*- coding: utf-8 -*- """ 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/...
errors
214
8
wemake-services/wemake-python-styleguide
train
283
3c1f4819bfe3fdb11c731856a0eaf54adb027da8
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
218
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
b06b03cfa862f3a38773c4eea1c237d371760e4a1142ec47f1941ce1c55fc41b
assert||# -*- coding: utf-8 -*- """ 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/...
errors
217
8
wemake-services/wemake-python-styleguide
train
283
3c1f4819bfe3fdb11c731856a0eaf54adb027da8
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
219
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors.get(found_error)
modified
76442f167c30c32b8ebc47311b0e33c842f65f6b14baa1c1d0e4a828f71c4df2
assert||# -*- coding: utf-8 -*- """ 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/...
errors.get(found_error)
218
8
wemake-services/wemake-python-styleguide
train
283
3c1f4819bfe3fdb11c731856a0eaf54adb027da8
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
247
4
assert
test_noqa_fixture_disabled
# -*- coding: utf-8 -*- """ 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/late...
len(all_violations)
modified
6d8296ecebe98b1bf1e9680afad884273e1250c9504d7f368ef56a81656df96e
assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ 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://wem...
len(all_violations)
246
4
wemake-services/wemake-python-styleguide
train
283
3c1f4819bfe3fdb11c731856a0eaf54adb027da8
train
tests/test_visitors/test_ast/test_compares/test_constant_compares/test_falsy_constant.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_constant_compares/test_falsy_constant.py
36
4
assert_*
test_falsy_constant
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_comparators = ( ('some', '[]'), ('some', '{}'), # noqa: P103 ('so...
[FalsyConstantCompareViolation])
added
c7bfc945a9de4962f514f23ae2a4d5b889260b72e198a9634a2e1ad78e9d6d7f
assert_*|test_falsy_constant|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_comparators = ( ('some', '[]'), ('some', '{}'), # noqa: P103...
null
null
null
wemake-services/wemake-python-styleguide
train
284
1683d2e06ac841b67366357f6a0fa26b4912e42d
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
216
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
ce031502ec8d2c03fd2db309fb07b38cc0f9319cc9e27497785f282d8aedd6f9
assert||# -*- coding: utf-8 -*- """ 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/...
errors
215
8
wemake-services/wemake-python-styleguide
train
284
1683d2e06ac841b67366357f6a0fa26b4912e42d
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
219
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
fddc52330c0540463bb22f4ab3516df30e491ec30309481f3db946952ef272a3
assert||# -*- coding: utf-8 -*- """ 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/...
errors
218
8
wemake-services/wemake-python-styleguide
train
284
1683d2e06ac841b67366357f6a0fa26b4912e42d
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
220
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors.get(found_error)
modified
b705fd69b6fe5be6a41acab38cdb9a99e633bb8c11bbe845ceadbae255e222e0
assert||# -*- coding: utf-8 -*- """ 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/...
errors.get(found_error)
219
8
wemake-services/wemake-python-styleguide
train
284
1683d2e06ac841b67366357f6a0fa26b4912e42d
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
248
4
assert
test_noqa_fixture_disabled
# -*- coding: utf-8 -*- """ 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/late...
len(all_violations)
modified
0306a2c19637b7748146311c8a10196e56df3e60a3c70e07d4689a069f59aa01
assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ 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://wem...
len(all_violations)
247
4
wemake-services/wemake-python-styleguide
train
284
1683d2e06ac841b67366357f6a0fa26b4912e42d
train
tests/test_visitors/test_ast/test_compares/test_constant_compares/test_falsy_constant.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_constant_compares/test_falsy_constant.py
37
4
assert_*
test_falsy_constant
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, WrongIsCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_comparators = ( ('some', '[]'), ('some', ...
[FalsyConstantCompareViolation])
modified
dff7c389a8d6b1f8b54caa91e707241ffc3370f10aa40f3816f85cd341eca8e9
assert_*|test_falsy_constant|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, WrongIsCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_comparators = ( ('some', '[]'), ('s...
[FalsyConstantCompareViolation])
36
4
wemake-services/wemake-python-styleguide
train
284
1683d2e06ac841b67366357f6a0fa26b4912e42d
train
tests/test_visitors/test_ast/test_compares/test_constant_compares/test_falsy_constant.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_constant_compares/test_falsy_constant.py
54
4
assert_*
test_falsy_constant_is
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, WrongIsCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_comparators = ( ('some', '[]'), ('some', ...
[ FalsyConstantCompareViolation, WrongIsCompareViolation, ])
added
0a7ed56ca7f5abcd9cbae38dd57036d8b431aa23eb081d77098bbc49fbf410dc
assert_*|test_falsy_constant_is|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, WrongIsCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_comparators = ( ('some', '[]'), ...
null
null
null
wemake-services/wemake-python-styleguide
train
284
1683d2e06ac841b67366357f6a0fa26b4912e42d
train
tests/test_visitors/test_ast/test_compares/test_constant_compares/test_falsy_constant.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_constant_compares/test_falsy_constant.py
110
4
assert_*
test_correct_constant_compare
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, WrongIsCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_comparators = ( ('some', '[]'), ('some', ...
(WrongIsCompareViolation,))
added
8b1a37556f94caa087d16b56a0ba50f46638f6d3e535b65131f7546399fbf5e1
assert_*|test_correct_constant_compare|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, WrongIsCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_comparators = ( ('some', ...
null
null
null
wemake-services/wemake-python-styleguide
train
284
1683d2e06ac841b67366357f6a0fa26b4912e42d
train
tests/test_visitors/test_ast/test_compares/test_constant_compares/test_is_constant_compare.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_constant_compares/test_is_constant_compare.py
53
4
assert_*
test_wrong_constant_is
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, WrongIsCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_comparators = ( ('some', '[1, 2]'), ('som...
( FalsyConstantCompareViolation, ))
added
2d62008bbb622b91a8e44103395d3519006bee448f4ebe2896e149e5abe50b90
assert_*|test_wrong_constant_is|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, WrongIsCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_comparators = ( ('some', '[1, 2]...
null
null
null
wemake-services/wemake-python-styleguide
train
285
c38647eb74239f7fcf700089a236b213068bb607
train
tests/test_visitors/test_ast/test_compares/test_constant_compares/test_falsy_constant.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_constant_compares/test_falsy_constant.py
111
4
assert_*
test_correct_constant_compare
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, WrongIsCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_comparators = ( ('some', '[]'), ('some', ...
(WrongIsCompareViolation,))
modified
3be1e0679b1854994fec78afc0b5f186403e15fdb8baf5bec6da56495b54d5ac
assert_*|test_correct_constant_compare|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, WrongIsCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_comparators = ( ('some', ...
(WrongIsCompareViolation,))
110
4
wemake-services/wemake-python-styleguide
train
285
c38647eb74239f7fcf700089a236b213068bb607
train
tests/test_visitors/test_ast/test_compares/test_constant_compares/test_is_constant_compare.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_constant_compares/test_is_constant_compare.py
54
4
assert_*
test_wrong_constant_is
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, WrongIsCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_comparators = ( ('some', '[1, 2]'), ('som...
( FalsyConstantCompareViolation, ))
modified
b8b44cd19af0b516d97942e9b594e243a0983d9a4cc181df90c0d2587d354ba9
assert_*|test_wrong_constant_is|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, WrongIsCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_comparators = ( ('some', '[1, 2]...
( FalsyConstantCompareViolation, ))
53
4
wemake-services/wemake-python-styleguide
train
286
588ddf029b12c593c6f5ab54baf1ef953a999600
train
tests/test_options.py
train
wemake-services/wemake-python-styleguide:tests/test_options.py
10
8
assert
test_option_docs
# -*- coding: utf-8 -*- from wemake_python_styleguide.options import config def test_option_docs(): """Ensures that all options are documented.""" for option in config.Configuration._options: # noqa: WPS437 option_name = '``{0}``'.format(option.long_option_name[2:]) assert option_name in
config.__doc__
added
826c11d64e16762adc2bcb55dd633a13ccf7bbbccbf898191b3fc1b8a703b22d
assert|test_option_docs|# -*- coding: utf-8 -*- from wemake_python_styleguide.options import config def test_option_docs(): """Ensures that all options are documented.""" for option in config.Configuration._options: # noqa: WPS437 option_name = '``{0}``'.format(option.long_option_name[2:]) assert option_name in
null
null
null
wemake-services/wemake-python-styleguide
train
286
588ddf029b12c593c6f5ab54baf1ef953a999600
train
tests/test_options.py
train
wemake-services/wemake-python-styleguide:tests/test_options.py
17
8
assert
test_option_help
# -*- coding: utf-8 -*- from wemake_python_styleguide.options import config def test_option_docs(): """Ensures that all options are documented.""" for option in config.Configuration._options: # noqa: WPS437 option_name = '``{0}``'.format(option.long_option_name[2:]) assert option_name in con...
option.help
added
7a069ff1dddab28a38f36b5b120458ca6d8349433fd508ed3cfb0e1fb0372289
assert|test_option_help|# -*- coding: utf-8 -*- from wemake_python_styleguide.options import config def test_option_docs(): """Ensures that all options are documented.""" for option in config.Configuration._options: # noqa: WPS437 option_name = '``{0}``'.format(option.long_option_name[2:]) assert option_name in config....
null
null
null
wemake-services/wemake-python-styleguide
train
286
588ddf029b12c593c6f5ab54baf1ef953a999600
train
tests/test_options.py
train
wemake-services/wemake-python-styleguide:tests/test_options.py
18
8
assert
test_option_help
# -*- coding: utf-8 -*- from wemake_python_styleguide.options import config def test_option_docs(): """Ensures that all options are documented.""" for option in config.Configuration._options: # noqa: WPS437 option_name = '``{0}``'.format(option.long_option_name[2:]) assert option_name in con...
option.help.split(' Defaults to:')[0].endswith('.')
added
850cb6a963ba9d5ec0de26e91ebb129704206959b27f238ddd3e14429e337c09
assert|test_option_help|# -*- coding: utf-8 -*- from wemake_python_styleguide.options import config def test_option_docs(): """Ensures that all options are documented.""" for option in config.Configuration._options: # noqa: WPS437 option_name = '``{0}``'.format(option.long_option_name[2:]) assert option_name in config....
null
null
null
wemake-services/wemake-python-styleguide
train
286
588ddf029b12c593c6f5ab54baf1ef953a999600
train
tests/test_violations/test_docs.py
train
wemake-services/wemake-python-styleguide:tests/test_violations/test_docs.py
39
16
assert
test_configuration
# -*- coding: utf-8 -*- from wemake_python_styleguide.options.config import Configuration def test_all_violations_are_documented(all_module_violations): """Ensures that all violations are documented.""" for module, classes in all_module_violations.items(): for violation_class in classes: ...
violation.__doc__
modified
e9ec6c4b002f627a0ca4bd458148c286271d5f63d3aec141689e5188ecce10a3
assert|test_configuration|# -*- coding: utf-8 -*- from wemake_python_styleguide.options.config import Configuration def test_all_violations_are_documented(all_module_violations): """Ensures that all violations are documented.""" for module, classes in all_module_violations.items(): for violation_class in classes: # Onc...
violation.__doc__
39
16
wemake-services/wemake-python-styleguide
train
286
588ddf029b12c593c6f5ab54baf1ef953a999600
train
tests/test_violations/test_docs.py
train
wemake-services/wemake-python-styleguide:tests/test_violations/test_docs.py
40
16
assert
test_configuration
# -*- coding: utf-8 -*- from wemake_python_styleguide.options.config import Configuration def test_all_violations_are_documented(all_module_violations): """Ensures that all violations are documented.""" for module, classes in all_module_violations.items(): for violation_class in classes: ...
violation.__doc__
modified
4dbeb1e2c09843a635b8734d3a92dce982a38a49756184219c9516ecf6ce132d
assert|test_configuration|# -*- coding: utf-8 -*- from wemake_python_styleguide.options.config import Configuration def test_all_violations_are_documented(all_module_violations): """Ensures that all violations are documented.""" for module, classes in all_module_violations.items(): for violation_class in classes: # Onc...
violation.__doc__
40
16
wemake-services/wemake-python-styleguide
train
286
588ddf029b12c593c6f5ab54baf1ef953a999600
train
tests/test_violations/test_docs.py
train
wemake-services/wemake-python-styleguide:tests/test_violations/test_docs.py
43
8
assert
test_configuration
# -*- coding: utf-8 -*- from wemake_python_styleguide.options.config import Configuration def test_all_violations_are_documented(all_module_violations): """Ensures that all violations are documented.""" for module, classes in all_module_violations.items(): for violation_class in classes: ...
is_listed
modified
9155a56a960a19379460aeb9cd1e53cb94f2f04212e9918f1f597c9930e0b87e
assert|test_configuration|# -*- coding: utf-8 -*- from wemake_python_styleguide.options.config import Configuration def test_all_violations_are_documented(all_module_violations): """Ensures that all violations are documented.""" for module, classes in all_module_violations.items(): for violation_class in classes: # Onc...
is_listed
43
8
wemake-services/wemake-python-styleguide
train
287
6a8dd230cc28adbe2f2dc77a0dacc55fcbf09f09
train
tests/test_visitors/test_ast/test_builtins/test_collection_hashes/test_hash_elements.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_collection_hashes/test_hash_elements.py
122
4
assert_*
test_collection_with_pure_duplicate
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( NonUniqueItemsInHashViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongCollectionVisitor, ) set_literal_template = '{{{0}, {1}}}' nested_set_template = """ {{ *{{ {0}...
[NonUniqueItemsInHashViolation])
modified
d6094afce251bcb32f3f3d4e094ad0a37d584c879643b86c05a2e955f88fd58e
assert_*|test_collection_with_pure_duplicate|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( NonUniqueItemsInHashViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongCollectionVisitor, ) set_literal_template = '{{{0}, {1}}}' nested_set_tem...
[NonUniqueItemsInHashViolation])
120
4
wemake-services/wemake-python-styleguide
train
287
6a8dd230cc28adbe2f2dc77a0dacc55fcbf09f09
train
tests/test_visitors/test_ast/test_builtins/test_collection_hashes/test_hash_elements.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_collection_hashes/test_hash_elements.py
147
4
assert_*
test_set_with_pure_duplicate
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( NonUniqueItemsInHashViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongCollectionVisitor, ) set_literal_template = '{{{0}, {1}}}' nested_set_template = """ {{ *{{ {0}...
[NonUniqueItemsInHashViolation])
modified
96608ec248c0b5fd05191fce4b96fff834d3484e4a563289c6d840c7789fd192
assert_*|test_set_with_pure_duplicate|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( NonUniqueItemsInHashViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongCollectionVisitor, ) set_literal_template = '{{{0}, {1}}}' nested_set_template =...
[NonUniqueItemsInHashViolation])
145
4
wemake-services/wemake-python-styleguide
train
287
6a8dd230cc28adbe2f2dc77a0dacc55fcbf09f09
train
tests/test_visitors/test_ast/test_builtins/test_collection_hashes/test_hash_elements.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_collection_hashes/test_hash_elements.py
176
4
assert_*
test_set_with_similar_values
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( NonUniqueItemsInHashViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongCollectionVisitor, ) set_literal_template = '{{{0}, {1}}}' nested_set_template = """ {{ *{{ {0}...
[NonUniqueItemsInHashViolation])
modified
7384743751936c426c85ae2faba82470343d2e0335f0152618024a54d65f9bdc
assert_*|test_set_with_similar_values|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( NonUniqueItemsInHashViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongCollectionVisitor, ) set_literal_template = '{{{0}, {1}}}' nested_set_template =...
[NonUniqueItemsInHashViolation])
174
4
wemake-services/wemake-python-styleguide
train
289
cd14300386535678a073829f7ae9a2da3dd3d1a9
train
tests/test_visitors/test_ast/test_operators/test_useless_math.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_operators/test_useless_math.py
207
4
assert_*
test_divide_by_one
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.mark.paramet...
[MeaninglessNumberOperationViolation])
added
b4dd49425ce4b0620a7ef5745c4d5a1e07952aec5797bede046eaf606556ebc0
assert_*|test_divide_by_one|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.m...
null
null
null
wemake-services/wemake-python-styleguide
train
290
9b3c1554c8e34acae5d597d6888b0c076cc068eb
train
tests/test_visitors/test_ast/test_operators/test_useless_math.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_operators/test_useless_math.py
98
4
assert_*
test_meaningless_math
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.mark.paramet...
[MeaninglessNumberOperationViolation])
modified
131f8250015b64f31d6c539ae46a1c727f883439f8333e97f744d7a1cc9602a2
assert_*|test_meaningless_math|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytes...
[MeaninglessNumberOperationViolation])
95
4
wemake-services/wemake-python-styleguide
train
290
9b3c1554c8e34acae5d597d6888b0c076cc068eb
train
tests/test_visitors/test_ast/test_operators/test_useless_math.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_operators/test_useless_math.py
212
4
assert_*
test_divide_by_one
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.mark.paramet...
[MeaninglessNumberOperationViolation])
added
d1c6b393e35195d5862c93312786de21d1b17a805d9eeb956880fb6f689bdd4f
assert_*|test_divide_by_one|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.m...
null
null
null
wemake-services/wemake-python-styleguide
train
291
dee5eedcdfaf89f1efa5db6adb8788c6818a03cb
train
tests/test_visitors/test_ast/test_blocks/test_overlap/test_function_block.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_blocks/test_overlap/test_function_block.py
242
4
assert_*
test_no_function_overload
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BlockAndLocalOverlapViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Functions: function_def1 = 'def {0}():' # Wrong usages: function_template1 = """ {0} ... ...
[BlockAndLocalOverlapViolation])
added
b28f3d084eb45c25397950324e98e12c7a501d4bf3724342c09bedadd2cf3e93
assert_*|test_no_function_overload|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BlockAndLocalOverlapViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Functions: function_def1 = 'def {0}():' # Wrong usages: function_temp...
null
null
null
wemake-services/wemake-python-styleguide
train
292
1b75d1a5225dd0dc12a001564093ddcad1ddc9e6
train
tests/test_visitors/test_ast/test_blocks/test_overlap/test_same_name.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_blocks/test_overlap/test_same_name.py
115
4
assert_*
test_reuse_overlap
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BlockAndLocalOverlapViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Contexts: context = """ {0} {1} """ # Block statements: block_statement1 = 'from some import {0...
[BlockAndLocalOverlapViolation])
added
9cecc174c6915b671f529b336a43470af6225d096d9568b131609fa9f45d80f1
assert_*|test_reuse_overlap|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BlockAndLocalOverlapViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Contexts: context = """ {0} {1} """ # Block statements: block_statement1 = '...
null
null
null
wemake-services/wemake-python-styleguide
train
293
e38ebce7affb92fdd817a2044689c693f454ae26
train
tests/test_visitors/test_ast/test_complexity/test_nested/test_nested_classes.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_nested/test_nested_classes.py
125
4
assert_*
test_nested_class
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.options.defaults import NESTED_CLASSES_WHITELIST from wemake_python_styleguide.violations.best_practices import ( NestedClassViolation, ) from wemake_python_styleguide.visitors.ast.complexity.nested import ( NestedComplexityVisitor, ) nested...
[NestedClassViolation])
modified
9a79467d1b8fa3de357438a27a123ce964ed592fa56881b470273234527e84f7
assert_*|test_nested_class|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.options.defaults import NESTED_CLASSES_WHITELIST from wemake_python_styleguide.violations.best_practices import ( NestedClassViolation, ) from wemake_python_styleguide.visitors.ast.complexity.nested import ( NestedComplexityV...
[NestedClassViolation])
125
4
wemake-services/wemake-python-styleguide
train
293
e38ebce7affb92fdd817a2044689c693f454ae26
train
tests/test_visitors/test_ast/test_complexity/test_nested/test_nested_classes.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_nested/test_nested_classes.py
126
4
assert_*
test_nested_class
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.options.defaults import NESTED_CLASSES_WHITELIST from wemake_python_styleguide.violations.best_practices import ( NestedClassViolation, ) from wemake_python_styleguide.visitors.ast.complexity.nested import ( NestedComplexityVisitor, ) nested...
nested_name)
modified
cec240dd13fca58721be97f723a17ea267ce74e27657e4ace84b9294c27f55b5
assert_*|test_nested_class|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.options.defaults import NESTED_CLASSES_WHITELIST from wemake_python_styleguide.violations.best_practices import ( NestedClassViolation, ) from wemake_python_styleguide.visitors.ast.complexity.nested import ( NestedComplexityV...
nested_name)
126
4
wemake-services/wemake-python-styleguide
train
293
e38ebce7affb92fdd817a2044689c693f454ae26
train
tests/test_visitors/test_ast/test_complexity/test_nested/test_nested_classes.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_nested/test_nested_classes.py
212
4
assert_*
test_whitelist_nested_classes_in_functions
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.options.defaults import NESTED_CLASSES_WHITELIST from wemake_python_styleguide.violations.best_practices import ( NestedClassViolation, ) from wemake_python_styleguide.visitors.ast.complexity.nested import ( NestedComplexityVisitor, ) nested...
[NestedClassViolation])
added
a6408b74587654bff5f0ea088bf92e9d98124fe7490ba1918edb3d5dabf8da6e
assert_*|test_whitelist_nested_classes_in_functions|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.options.defaults import NESTED_CLASSES_WHITELIST from wemake_python_styleguide.violations.best_practices import ( NestedClassViolation, ) from wemake_python_styleguide.visitors.ast.complexity.nested i...
null
null
null
wemake-services/wemake-python-styleguide
train
293
e38ebce7affb92fdd817a2044689c693f454ae26
train
tests/test_visitors/test_ast/test_complexity/test_nested/test_nested_classes.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_nested/test_nested_classes.py
213
4
assert_*
test_whitelist_nested_classes_in_functions
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.options.defaults import NESTED_CLASSES_WHITELIST from wemake_python_styleguide.violations.best_practices import ( NestedClassViolation, ) from wemake_python_styleguide.visitors.ast.complexity.nested import ( NestedComplexityVisitor, ) nested...
whitelist_name)
added
14de58e7e6b75769806b2c03a744db34d87ffa2e1c723d079afda1fc17d7f6ed
assert_*|test_whitelist_nested_classes_in_functions|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.options.defaults import NESTED_CLASSES_WHITELIST from wemake_python_styleguide.violations.best_practices import ( NestedClassViolation, ) from wemake_python_styleguide.visitors.ast.complexity.nested i...
null
null
null
wemake-services/wemake-python-styleguide
train
294
aeedfc399b950820fb2483f07a993a3c50962e12
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
217
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
221ac7949af24c153ee5539bc4c5e1e8b87312f7e1cbcf415a13457ff739aad2
assert||# -*- coding: utf-8 -*- """ 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/...
errors
216
8
wemake-services/wemake-python-styleguide
train
294
aeedfc399b950820fb2483f07a993a3c50962e12
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
220
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
733dfbc5e04bcda010e9642e6c03ad9f861f39bdfe4c763b9117583e21c8dd04
assert||# -*- coding: utf-8 -*- """ 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/...
errors
219
8
wemake-services/wemake-python-styleguide
train
294
aeedfc399b950820fb2483f07a993a3c50962e12
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
221
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors.get(found_error)
modified
527af6c6e206ac763acca1913bf9096c8de2546c1fec1a49aebd6372ee4a830c
assert||# -*- coding: utf-8 -*- """ 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/...
errors.get(found_error)
220
8
wemake-services/wemake-python-styleguide
train
294
aeedfc399b950820fb2483f07a993a3c50962e12
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
249
4
assert
test_noqa_fixture_disabled
# -*- coding: utf-8 -*- """ 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/late...
len(all_violations)
modified
e6afa3602641373195b1def1e9b396a8a4fe62f84cf657e4731a94d3b052dcac
assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ 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://wem...
len(all_violations)
248
4
wemake-services/wemake-python-styleguide
train
294
aeedfc399b950820fb2483f07a993a3c50962e12
train
tests/test_visitors/test_ast/test_statements/test_wrong_named_keyword.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_wrong_named_keyword.py
39
4
assert_*
test_wrong_starred_keyword
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongNamedKeywordViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( WrongNamedKeywordVisitor, ) @pytest.mark.parametrize('code', [ 'print(**{"@": "2"})', 'print(**{"2ab": "...
[WrongNamedKeywordViolation])
added
211fbfd23a1ead1dd6d07e5eecb12b2641cdd276c748c2288b558cb5ef0552b7
assert_*|test_wrong_starred_keyword|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongNamedKeywordViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( WrongNamedKeywordVisitor, ) @pytest.mark.parametrize('code', [ 'print(**{"@": "2"})', 'p...
null
null
null
wemake-services/wemake-python-styleguide
train
295
9feec3ba7d7f374600e095af1e2a6d2aa7e59ad1
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
218
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
1e87368256ff4c9ebfb72787faf330ff7aac16b258b05336c60c69db97b79686
assert||# -*- coding: utf-8 -*- """ 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/...
errors
217
8
wemake-services/wemake-python-styleguide
train
295
9feec3ba7d7f374600e095af1e2a6d2aa7e59ad1
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
221
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
ccf2e74da9d0a40a87d2ec86afa757b70b2d6f13a5c3c67ad407b2b004c46f0a
assert||# -*- coding: utf-8 -*- """ 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/...
errors
220
8
wemake-services/wemake-python-styleguide
train
295
9feec3ba7d7f374600e095af1e2a6d2aa7e59ad1
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
222
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors.get(found_error)
modified
f85d81ee6896bc98e3860c761a5701e4648d19c4be65b445266e4e58db1a55b6
assert||# -*- coding: utf-8 -*- """ 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/...
errors.get(found_error)
221
8
wemake-services/wemake-python-styleguide
train
295
9feec3ba7d7f374600e095af1e2a6d2aa7e59ad1
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
250
4
assert
test_noqa_fixture_disabled
# -*- coding: utf-8 -*- """ 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/late...
len(all_violations)
modified
73789dcdd1aedb5cb74ed7207ed57d59e0a489e8534c5191ca05302a740956d9
assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ 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://wem...
len(all_violations)
249
4
wemake-services/wemake-python-styleguide
train
295
9feec3ba7d7f374600e095af1e2a6d2aa7e59ad1
train
tests/test_visitors/test_ast/test_functions/test_implicit_primitive.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_implicit_primitive.py
59
4
assert_*
test_wrong_lambda
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( ImplicitPrimitiveViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( UselessLambdaDefinitionVisitor, ) @pytest.mark.parametrize('code', [ 'lambda x: 0', 'lambda *x: []', ...
[ImplicitPrimitiveViolation])
added
3d4e7dbda236b7f473f11fcd84c875ef526ab93c08610ecb63e7c0e63d21cbde
assert_*|test_wrong_lambda|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( ImplicitPrimitiveViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( UselessLambdaDefinitionVisitor, ) @pytest.mark.parametrize('code', [ 'lambda x: 0', 'lambda *x: []...
null
null
null
wemake-services/wemake-python-styleguide
train
296
2279671e3f03db73fc7cefde314e0de013d88716
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
223
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
33c18239d91956ef121203d7cd7cd69135ccf5c833040d84ae1aa9fa10d1f8fc
assert||# -*- coding: utf-8 -*- """ 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/...
errors
221
8
wemake-services/wemake-python-styleguide
train
296
2279671e3f03db73fc7cefde314e0de013d88716
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
224
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors.get(found_error)
modified
cccd57b860fa178e4ad76823f0ef5865bf170e3534ef23793131ce6f2b3d5a72
assert||# -*- coding: utf-8 -*- """ 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/...
errors.get(found_error)
222
8
wemake-services/wemake-python-styleguide
train
296
2279671e3f03db73fc7cefde314e0de013d88716
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
252
4
assert
test_noqa_fixture_disabled
# -*- coding: utf-8 -*- """ 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/late...
len(all_violations)
modified
f5a8aa582cd3f419e3ba89eddc60f2fb38d4dc8785e7132d1ee40abe554e34fe
assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ 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://wem...
len(all_violations)
250
4
wemake-services/wemake-python-styleguide
train
296
2279671e3f03db73fc7cefde314e0de013d88716
train
tests/test_violations/test_codes.py
train
wemake-services/wemake-python-styleguide:tests/test_violations/test_codes.py
21
12
assert
test_all_violations_correct_numbers
# -*- coding: utf-8 -*- def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [] for violation in all_violations: codes.append(int(violation.code)) assert len(set(codes)) == len(all_violations) def test_all_violations_cor...
violation_class.code
modified
2078f20a507643159afbfd9adb77fa54b4bc01f4ce102a415aa96f6718b6bdf4
assert|test_all_violations_correct_numbers|# -*- coding: utf-8 -*- def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [] for violation in all_violations: codes.append(int(violation.code)) assert len(set(codes)) == len(all_violations) def test_all_...
violation_class.code
21
12
wemake-services/wemake-python-styleguide
train
296
2279671e3f03db73fc7cefde314e0de013d88716
train
tests/test_visitors/test_ast/test_annotations/test_argument_annotations.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_annotations/test_argument_annotations.py
89
4
assert_*
test_forbidden_literal_none_annotation
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.annotations import ( LiteralNoneViolation, MultilineFunctionAnnotationViolation, WrongAnnotationVisitor, ) # Correct: correct_function_without_arguments = """ def function(): ... """ correct_function_without_annotations = ...
[LiteralNoneViolation])
added
34005d331d8e319e19691a2c5fc1955050d5c4334cffd315ab96abbac5ea6a07
assert_*|test_forbidden_literal_none_annotation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.annotations import ( LiteralNoneViolation, MultilineFunctionAnnotationViolation, WrongAnnotationVisitor, ) # Correct: correct_function_without_arguments = """ def function(): ... """ correct_...
null
null
null
wemake-services/wemake-python-styleguide
train
296
2279671e3f03db73fc7cefde314e0de013d88716
train
tests/test_visitors/test_ast/test_annotations/test_argument_annotations.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_annotations/test_argument_annotations.py
109
4
assert_*
test_wrong_argument_annotation
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.annotations import ( LiteralNoneViolation, MultilineFunctionAnnotationViolation, WrongAnnotationVisitor, ) # Correct: correct_function_without_arguments = """ def function(): ... """ correct_function_without_annotations = ...
[MultilineFunctionAnnotationViolation])
added
f6389a885043a6fba23cf8fefd990a31a3ee0eeb39c71224aea70b1a19385228
assert_*|test_wrong_argument_annotation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.annotations import ( LiteralNoneViolation, MultilineFunctionAnnotationViolation, WrongAnnotationVisitor, ) # Correct: correct_function_without_arguments = """ def function(): ... """ correct_function...
null
null
null
wemake-services/wemake-python-styleguide
train
296
2279671e3f03db73fc7cefde314e0de013d88716
train
tests/test_visitors/test_ast/test_annotations/test_return_annotations.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_annotations/test_return_annotations.py
97
4
assert_*
test_wrong_return_annotation
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.annotations import ( LiteralNoneViolation, MultilineFunctionAnnotationViolation, WrongAnnotationVisitor, ) # Correct: correct_function_without_annotations = """ def function(): ... """ correct_simple_return = """ def funct...
[MultilineFunctionAnnotationViolation])
added
71f3f92dfd04e669bcb3fef2bebeba6e9efc3e8b13c4fe6ab2a886dbd570e9b8
assert_*|test_wrong_return_annotation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.annotations import ( LiteralNoneViolation, MultilineFunctionAnnotationViolation, WrongAnnotationVisitor, ) # Correct: correct_function_without_annotations = """ def function(): ... """ correct_simple_r...
null
null
null
wemake-services/wemake-python-styleguide
train
296
2279671e3f03db73fc7cefde314e0de013d88716
train
tests/test_visitors/test_ast/test_annotations/test_return_annotations.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_annotations/test_return_annotations.py
117
4
assert_*
test_wrong_literal_none_return_annotation
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.annotations import ( LiteralNoneViolation, MultilineFunctionAnnotationViolation, WrongAnnotationVisitor, ) # Correct: correct_function_without_annotations = """ def function(): ... """ correct_simple_return = """ def funct...
[LiteralNoneViolation])
added
34e4699a6e482dd09686130a29116dd8d0fe684c863c2b38e27d72865ff687bf
assert_*|test_wrong_literal_none_return_annotation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.annotations import ( LiteralNoneViolation, MultilineFunctionAnnotationViolation, WrongAnnotationVisitor, ) # Correct: correct_function_without_annotations = """ def function(): ... """ cor...
null
null
null
wemake-services/wemake-python-styleguide
train
297
702a57c653c03e61fc0bce4ee22de45ad6e2d47c
train
tests/test_visitors/test_tokenize/test_conditions/test_implicit_elif.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_conditions/test_implicit_elif.py
116
4
assert_*
test_implicit_elif_statements
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( ImplicitElifViolation, ) from wemake_python_styleguide.visitors.tokenize.conditions import IfElseVisitor # Correct: elif_cases = """ if some: ... elif other: ... elif third: ... else: ... """ if_...
[ImplicitElifViolation])
added
3014386ae19d792768c11d62ad1c4c87e1be3c71b91056316de1d6ff5e90dcf5
assert_*|test_implicit_elif_statements|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( ImplicitElifViolation, ) from wemake_python_styleguide.visitors.tokenize.conditions import IfElseVisitor # Correct: elif_cases = """ if some: ... elif other: ... elif third: ... els...
null
null
null
wemake-services/wemake-python-styleguide
train
298
f817ebca43acd545eb6078fcb6773649e7c47248
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
221
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
421c88479ebe84e8f6120d4b7a29ac236282553b585f9fd9638aefb6b3caf996
assert||# -*- coding: utf-8 -*- """ 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/...
errors
220
8
wemake-services/wemake-python-styleguide
train
298
f817ebca43acd545eb6078fcb6773649e7c47248
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
224
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors
modified
a42846b98ec09dabc80d714dfcaf8afe01d8701059fc25d9a21194d2b8d57bbe
assert||# -*- coding: utf-8 -*- """ 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/...
errors
223
8
wemake-services/wemake-python-styleguide
train
298
f817ebca43acd545eb6078fcb6773649e7c47248
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
225
8
assert
# -*- coding: utf-8 -*- """ 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/late...
errors.get(found_error)
modified
3de3e1af0829c86b016f1b240299cf04314d9b00a163417fe52679d15fa63607
assert||# -*- coding: utf-8 -*- """ 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/...
errors.get(found_error)
224
8
wemake-services/wemake-python-styleguide
train
298
f817ebca43acd545eb6078fcb6773649e7c47248
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
253
4
assert
test_noqa_fixture_disabled
# -*- coding: utf-8 -*- """ 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/late...
len(all_violations)
modified
804d8025b75352e58041e6e31d079e0ed4bfe82551fcf7f754f47c2f79d109b2
assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ 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://wem...
len(all_violations)
252
4
wemake-services/wemake-python-styleguide
train
298
f817ebca43acd545eb6078fcb6773649e7c47248
train
tests/test_visitors/test_ast/test_imports/test_vague_imports.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_imports/test_vague_imports.py
32
4
assert_*
test_vague_method_name_import
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide import constants from wemake_python_styleguide.violations.consistency import ( VagueImportViolation, ) from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor import_template = 'from mod import {0}' alias_import_template = ...
[VagueImportViolation])
added
e00889fba576cf2f7963fa6534d79b9231872b44f070a6b5bedca39244784542
assert_*|test_vague_method_name_import|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide import constants from wemake_python_styleguide.violations.consistency import ( VagueImportViolation, ) from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor import_template = 'from mod impor...
null
null
null
wemake-services/wemake-python-styleguide
train
298
f817ebca43acd545eb6078fcb6773649e7c47248
train
tests/test_visitors/test_ast/test_imports/test_vague_imports.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_imports/test_vague_imports.py
51
4
assert_*
test_vague_alias_import
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide import constants from wemake_python_styleguide.violations.consistency import ( VagueImportViolation, ) from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor import_template = 'from mod import {0}' alias_import_template = ...
[VagueImportViolation])
added
83731485865325ae2037658243093510ac8d26657d751c03e2ecae89e8dc9403
assert_*|test_vague_alias_import|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide import constants from wemake_python_styleguide.violations.consistency import ( VagueImportViolation, ) from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor import_template = 'from mod import {0}'...
null
null
null
wemake-services/wemake-python-styleguide
train
299
30f22b6f24184f7e0dfd890720b895e992eeab16
train
tests/test_visitors/test_tokenize/test_comments/test_noqa_count.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_noqa_count.py
34
4
assert_*
test_noqa_overuse
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.options import defaults from wemake_python_styleguide.violations.best_practices import ( OveruseOfNoqaCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import ( WrongCommentVisitor, ) @pytest.mark.parametrize('cod...
[OveruseOfNoqaCommentViolation])
modified
67b0db826542477e75a58f0f81319035c4b71fd8b59755cb72f91c2fa36bcdbc
assert_*|test_noqa_overuse|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.options import defaults from wemake_python_styleguide.violations.best_practices import ( OveruseOfNoqaCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import ( WrongCommentVisitor, ) @pytest.mark.p...
[OveruseOfNoqaCommentViolation])
33
4