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
447
fba0f6bccb31206c445a137b780e1ee35fc78fc9
train
tests/test_visitors/test_ast/test_statements/test_statements_with_no_effect.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_statements_with_no_effect.py
410
4
assert_*
test_statement_with_useless_docstring
import pytest from wemake_python_styleguide.violations.best_practices import ( StatementHasNoEffectViolation, ) from wemake_python_styleguide.violations.refactoring import ( MisrefactoredAssignmentViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # ...
[StatementHasNoEffectViolation])
modified
c5b821d142f37e1f627193beda7dd700daa830beaeb0295ab095b74e248c0dc1
assert_*|test_statement_with_useless_docstring|import pytest from wemake_python_styleguide.violations.best_practices import ( StatementHasNoEffectViolation, ) from wemake_python_styleguide.violations.refactoring import ( MisrefactoredAssignmentViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( ...
[StatementHasNoEffectViolation])
411
4
wemake-services/wemake-python-styleguide
train
447
fba0f6bccb31206c445a137b780e1ee35fc78fc9
train
tests/test_visitors/test_tokenize/test_statements/test_bracket_lines.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_statements/test_bracket_lines.py
173
4
assert_*
test_wrong_brackets
import pytest from wemake_python_styleguide.violations.consistency import ( WrongBracketPositionViolation, ) from wemake_python_styleguide.visitors.tokenize.statements import ( BracketLocationVisitor, ) # Correct: correct_simple_variable = 'xy = [[], [], ()]' correct_simple_function_call = 'print([1, 2, 3], ...
[WrongBracketPositionViolation])
modified
2ac2ff5f94ecb94cfaeb6bcec6da647c494ae5d32316360b0a7d58892341ad24
assert_*|test_wrong_brackets|import pytest from wemake_python_styleguide.violations.consistency import ( WrongBracketPositionViolation, ) from wemake_python_styleguide.visitors.tokenize.statements import ( BracketLocationVisitor, ) # Correct: correct_simple_variable = 'xy = [[], [], ()]' correct_simple_function_call = ...
[WrongBracketPositionViolation])
174
4
wemake-services/wemake-python-styleguide
train
450
46268a0b9c6e830a0ae99425db7da35281086ffe
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
160
4
assert_*
test_wrong_return_statement
import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): ... """ correct_example2 = """ def function(): retur...
[InconsistentReturnViolation])
added
aefa994ff8ed34a1703a537316ee50b170c298393853b7957b4dbadea9c35fb4
assert_*|test_wrong_return_statement|import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): ... """ correct_example2 = """ def ...
null
null
null
wemake-services/wemake-python-styleguide
train
450
46268a0b9c6e830a0ae99425db7da35281086ffe
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
180
4
assert_*
test_douple_wrong_return_statement
import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): ... """ correct_example2 = """ def function(): retur...
[ InconsistentReturnViolation, InconsistentReturnViolation, ])
added
0523798883b16a6dac7a3f497517ffd6ab9c31f7065346dbb20412c24c7831d7
assert_*|test_douple_wrong_return_statement|import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): ... """ correct_example2 = "...
null
null
null
wemake-services/wemake-python-styleguide
train
450
46268a0b9c6e830a0ae99425db7da35281086ffe
train
tests/test_visitors/test_decorators/test_alias_decorator.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_decorators/test_alias_decorator.py
16
9
pytest.raises
test_raises_for_duplicates
import pytest from wemake_python_styleguide.visitors.decorators import alias class _HasAliasedProp(object): def existing(self): """Existing.""" def first(self): """First.""" def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" with pyte...
ValueError, match='duplicate')
added
c314fef5c46cc4c2395ad65ea42fa95436cfb006c2c0c8587d94151244ba2dc9
pytest.raises|test_raises_for_duplicates|import pytest from wemake_python_styleguide.visitors.decorators import alias class _HasAliasedProp(object): def existing(self): """Existing.""" def first(self): """First.""" def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" with p...
null
null
null
wemake-services/wemake-python-styleguide
train
450
46268a0b9c6e830a0ae99425db7da35281086ffe
train
tests/test_visitors/test_decorators/test_alias_decorator.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_decorators/test_alias_decorator.py
22
9
pytest.raises
test_useless_alias
import pytest from wemake_python_styleguide.visitors.decorators import alias class _HasAliasedProp(object): def existing(self): """Existing.""" def first(self): """First.""" def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" with pyte...
ValueError, match='duplicate')
added
b5d05ec8cabcd01a700e1e1e34244c5309404cb1ab46ed654d8b62c3091b6641
pytest.raises|test_useless_alias|import pytest from wemake_python_styleguide.visitors.decorators import alias class _HasAliasedProp(object): def existing(self): """Existing.""" def first(self): """First.""" def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" with pytest.ra...
null
null
null
wemake-services/wemake-python-styleguide
train
450
46268a0b9c6e830a0ae99425db7da35281086ffe
train
tests/test_visitors/test_decorators/test_alias_decorator.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_decorators/test_alias_decorator.py
28
9
pytest.raises
test_raises_for_missing_alias
import pytest from wemake_python_styleguide.visitors.decorators import alias class _HasAliasedProp(object): def existing(self): """Existing.""" def first(self): """First.""" def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" with pyte...
AttributeError)
added
3868d59345cea394d8323a49b653f399e645406056d376bf9d71aa38e907aa39
pytest.raises|test_raises_for_missing_alias|import pytest from wemake_python_styleguide.visitors.decorators import alias class _HasAliasedProp(object): def existing(self): """Existing.""" def first(self): """First.""" def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" wit...
null
null
null
wemake-services/wemake-python-styleguide
train
450
46268a0b9c6e830a0ae99425db7da35281086ffe
train
tests/test_visitors/test_decorators/test_alias_decorator.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_decorators/test_alias_decorator.py
34
9
pytest.raises
test_raises_for_existing_alias
import pytest from wemake_python_styleguide.visitors.decorators import alias class _HasAliasedProp(object): def existing(self): """Existing.""" def first(self): """First.""" def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" with pyte...
AttributeError)
added
deea6830b08f9dd3e40299c0f0999bfcc355cc9d429f9c48afa66f8dddacbbbb
pytest.raises|test_raises_for_existing_alias|import pytest from wemake_python_styleguide.visitors.decorators import alias class _HasAliasedProp(object): def existing(self): """Existing.""" def first(self): """First.""" def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" wi...
null
null
null
wemake-services/wemake-python-styleguide
train
451
35be3510aab775b3c144519f7a3351d6df85c6d6
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
129
4
assert_*
test_incorrect_method_order
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 __init__(self): ......
[WrongMethodOrderViolation])
added
acddd4cad94041107b3bfa94743809f4647a6814530fdee56e84238fe3480721
assert_*|test_incorrect_method_order|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 __init__(self): ....
null
null
null
wemake-services/wemake-python-styleguide
train
452
e28d945dd374ec87902c2d4d0c6db2e0f265d1dc
train
tests/test_regressions/test_regression112.py
train
wemake-services/wemake-python-styleguide:tests/test_regressions/test_regression112.py
51
4
assert
test_regression112
import ast from pyflakes.checker import Checker as PyFlakesChecker from wemake_python_styleguide.checker import Checker code_that_breakes = ''' def current_session( telegram_id: int, for_update: bool = True, ) -> TelegramSession: """ Was triggering `AttributeError`. See: https://github.com/wemak...
None
modified
2e91a4f8050f86c4156b863fd9645a14044974057a40cf79d9a5b84af7d51c3d
assert|test_regression112|import ast from pyflakes.checker import Checker as PyFlakesChecker from wemake_python_styleguide.checker import Checker code_that_breakes = ''' def current_session( telegram_id: int, for_update: bool = True, ) -> TelegramSession: """ Was triggering `AttributeError`. See: https://github.com/wem...
None
51
4
wemake-services/wemake-python-styleguide
train
452
e28d945dd374ec87902c2d4d0c6db2e0f265d1dc
train
tests/test_regressions/test_regression112.py
train
wemake-services/wemake-python-styleguide:tests/test_regressions/test_regression112.py
52
4
assert
test_regression112
import ast from pyflakes.checker import Checker as PyFlakesChecker from wemake_python_styleguide.checker import Checker code_that_breakes = ''' def current_session( telegram_id: int, for_update: bool = True, ) -> TelegramSession: """ Was triggering `AttributeError`. See: https://github.com/wemak...
flakes.root
modified
f12d6625afc158246599aac73529bfe20f95070f995a8d38c4a0761839fe8a24
assert|test_regression112|import ast from pyflakes.checker import Checker as PyFlakesChecker from wemake_python_styleguide.checker import Checker code_that_breakes = ''' def current_session( telegram_id: int, for_update: bool = True, ) -> TelegramSession: """ Was triggering `AttributeError`. See: https://github.com/wem...
flakes.root
52
4
wemake-services/wemake-python-styleguide
train
452
e28d945dd374ec87902c2d4d0c6db2e0f265d1dc
train
tests/test_visitors/test_ast/test_compares/test_heterogenous_compare.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_heterogenous_compare.py
39
4
assert_*
test_heterogenous_compare
import pytest from wemake_python_styleguide.violations.best_practices import ( HeterogenousCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import CompareSanityVisitor @pytest.mark.parametrize('code', [ 'x > y < z', 'x >= y < z', 'x > y <= z', 'x >= y <= z', 'x < y > z'...
[HeterogenousCompareViolation])
modified
114d19a1b8d64a317c38188b527bf3305b5416f15f9191a463fb638f8a21fbf2
assert_*|test_heterogenous_compare|import pytest from wemake_python_styleguide.violations.best_practices import ( HeterogenousCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import CompareSanityVisitor @pytest.mark.parametrize('code', [ 'x > y < z', 'x >= y < z', 'x > y <= z', 'x >= y <= z', 'x ...
[HeterogenousCompareViolation])
39
4
wemake-services/wemake-python-styleguide
train
453
1995ce51f8a57149f1b774b2742fc4b08d82f5cb
train
tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_implicit_string_concatenation.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_implicit_string_concatenation.py
79
4
assert_*
test_implicit_string_concatenation
import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitStringConcatenationViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringConcatenationVisitor, ) # Correct: correct_string_sum = 'some = "a" + "b"' correct_tuple_with_strings = """ some ...
[ImplicitStringConcatenationViolation])
added
006f001d65a7cf494c59b0decd2f2d00594b821c71850f8f2271e6ab26e6a317
assert_*|test_implicit_string_concatenation|import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitStringConcatenationViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringConcatenationVisitor, ) # Correct: correct_string_sum = 'some = "a" + "b"' correc...
null
null
null
wemake-services/wemake-python-styleguide
train
454
d9936d38c70b5364ce8ab2a6699a3e606341e3ac
train
tests/test_visitors/test_ast/test_naming/test_unused/test_unused_definition.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_unused/test_unused_definition.py
56
4
assert_*
test_unused_variable_tuple_definition
from textwrap import indent import pytest from wemake_python_styleguide.violations.naming import ( UnusedVariableIsDefinedViolation, ) from wemake_python_styleguide.visitors.ast.naming import ( UnusedVaribaleDefinitionVisitor, ) module_context = '{0}' function_context = """ def function(): {0} """ method_c...
[UnusedVariableIsDefinedViolation])
added
7c767db8219bf6dad6fbe83dd7bf4c0aca989d35927c1a304c4228353005cfbd
assert_*|test_unused_variable_tuple_definition|from textwrap import indent import pytest from wemake_python_styleguide.violations.naming import ( UnusedVariableIsDefinedViolation, ) from wemake_python_styleguide.visitors.ast.naming import ( UnusedVaribaleDefinitionVisitor, ) module_context = '{0}' function_context = ""...
null
null
null
wemake-services/wemake-python-styleguide
train
454
d9936d38c70b5364ce8ab2a6699a3e606341e3ac
train
tests/test_visitors/test_ast/test_naming/test_unused/test_unused_definition.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_unused/test_unused_definition.py
127
4
assert_*
test_raw_unused_variable_definition
from textwrap import indent import pytest from wemake_python_styleguide.violations.naming import ( UnusedVariableIsDefinedViolation, ) from wemake_python_styleguide.visitors.ast.naming import ( UnusedVaribaleDefinitionVisitor, ) module_context = '{0}' function_context = """ def function(): {0} """ method_c...
[UnusedVariableIsDefinedViolation])
added
639a39a9f1db55b0e2097fc01720ddf48f86454f0aa6b436173d1eaa4e57dd11
assert_*|test_raw_unused_variable_definition|from textwrap import indent import pytest from wemake_python_styleguide.violations.naming import ( UnusedVariableIsDefinedViolation, ) from wemake_python_styleguide.visitors.ast.naming import ( UnusedVaribaleDefinitionVisitor, ) module_context = '{0}' function_context = """ ...
null
null
null
wemake-services/wemake-python-styleguide
train
454
d9936d38c70b5364ce8ab2a6699a3e606341e3ac
train
tests/test_visitors/test_ast/test_naming/test_unused/test_unused_definition.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_unused/test_unused_definition.py
195
4
assert_*
test_protected_unused_variable_definition
from textwrap import indent import pytest from wemake_python_styleguide.violations.naming import ( UnusedVariableIsDefinedViolation, ) from wemake_python_styleguide.visitors.ast.naming import ( UnusedVaribaleDefinitionVisitor, ) module_context = '{0}' function_context = """ def function(): {0} """ method_c...
[UnusedVariableIsDefinedViolation])
added
14bbd90fd6527e009c09bd6f61c93d6a2198b5ec79160683149e7bf16e0965f3
assert_*|test_protected_unused_variable_definition|from textwrap import indent import pytest from wemake_python_styleguide.violations.naming import ( UnusedVariableIsDefinedViolation, ) from wemake_python_styleguide.visitors.ast.naming import ( UnusedVaribaleDefinitionVisitor, ) module_context = '{0}' function_context ...
null
null
null
wemake-services/wemake-python-styleguide
train
456
7d3a7ef4ef53e117a9909a5401e9e48cea7ff929
train
tests/fixtures/noqa/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa/noqa.py
243
4
assert
""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from ...
test_function(4)
modified
07e587cb502ac3fc9c20abef8990b238996f3adc598556528dca0cabf54c8509
assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from .ve...
test_function(4)
243
4
wemake-services/wemake-python-styleguide
train
456
7d3a7ef4ef53e117a9909a5401e9e48cea7ff929
train
tests/fixtures/noqa/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa/noqa.py
302
0
assert
""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from ...
octal_number
modified
475e9a4d11dec675edf9b8d500c5d635c820115f36a97ebc293f02e09b74fc48
assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from .ve...
octal_number
302
0
wemake-services/wemake-python-styleguide
train
456
7d3a7ef4ef53e117a9909a5401e9e48cea7ff929
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
295
12
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
7c2d21652cbab4645e2bd3171b133b987ae85bd1ff78565abf93803f253eae74
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
294
12
wemake-services/wemake-python-styleguide
train
456
7d3a7ef4ef53e117a9909a5401e9e48cea7ff929
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
298
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
737ea1609a702c07d35b1326cc74817f4245d09eb80ce752b82dcb7adbc5e29e
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
297
8
wemake-services/wemake-python-styleguide
train
456
7d3a7ef4ef53e117a9909a5401e9e48cea7ff929
train
tests/test_visitors/test_ast/test_complexity/test_counts/test_imports_counts.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_imports_counts.py
64
4
assert_*
test_module_import_counts_violation
import pytest from wemake_python_styleguide.violations.complexity import ( TooManyImportedModuleMembersViolation, TooManyImportedNamesViolation, TooManyImportsViolation, ) from wemake_python_styleguide.visitors.ast.complexity.imports import ( ImportMembersVisitor, ) module_import = '' module_with_regu...
[TooManyImportsViolation])
modified
ba2f8711624002955a2c0850d1f2dbcf0aa5976b193f99ef550288b52d01acbe
assert_*|test_module_import_counts_violation|import pytest from wemake_python_styleguide.violations.complexity import ( TooManyImportedModuleMembersViolation, TooManyImportedNamesViolation, TooManyImportsViolation, ) from wemake_python_styleguide.visitors.ast.complexity.imports import ( ImportMembersVisitor, ) module_i...
[TooManyImportsViolation])
64
4
wemake-services/wemake-python-styleguide
train
456
7d3a7ef4ef53e117a9909a5401e9e48cea7ff929
train
tests/test_visitors/test_ast/test_complexity/test_counts/test_imports_counts.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_imports_counts.py
87
4
assert_*
test_module_imported_names_counts_violation
import pytest from wemake_python_styleguide.violations.complexity import ( TooManyImportedModuleMembersViolation, TooManyImportedNamesViolation, TooManyImportsViolation, ) from wemake_python_styleguide.visitors.ast.complexity.imports import ( ImportMembersVisitor, ) module_import = '' module_with_regu...
option_values.max_imported_names)
modified
511ae8c7b60ed7f69c17dfc038554d44345d2870ea0e682ff344c0639eaee6b3
assert_*|test_module_imported_names_counts_violation|import pytest from wemake_python_styleguide.violations.complexity import ( TooManyImportedModuleMembersViolation, TooManyImportedNamesViolation, TooManyImportsViolation, ) from wemake_python_styleguide.visitors.ast.complexity.imports import ( ImportMembersVisitor, ) ...
option_values.max_imported_names)
87
4
wemake-services/wemake-python-styleguide
train
456
7d3a7ef4ef53e117a9909a5401e9e48cea7ff929
train
tests/test_visitors/test_ast/test_complexity/test_counts/test_tuple_unpack_length.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_tuple_unpack_length.py
71
4
assert_*
test_unpack_length_violation
import pytest from wemake_python_styleguide.violations.complexity import ( TooLongTupleUnpackViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( TupleUnpackVisitor, ) short_unpack = 'a, b = (1, 2)' short_starred_unpack = 'a, b, *rest = (1, 2, 3, 4, 5)' single_unpack = 'result = ...
[TooLongTupleUnpackViolation])
added
10ebedf4801904cd0f32762ba2a962dbc87eecc385ada6e580ec44f551e814be
assert_*|test_unpack_length_violation|import pytest from wemake_python_styleguide.violations.complexity import ( TooLongTupleUnpackViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( TupleUnpackVisitor, ) short_unpack = 'a, b = (1, 2)' short_starred_unpack = 'a, b, *rest = (1, 2, 3, 4, 5)...
null
null
null
wemake-services/wemake-python-styleguide
train
456
7d3a7ef4ef53e117a9909a5401e9e48cea7ff929
train
tests/test_visitors/test_ast/test_complexity/test_counts/test_tuple_unpack_length.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_tuple_unpack_length.py
72
4
assert_*
test_unpack_length_violation
import pytest from wemake_python_styleguide.violations.complexity import ( TooLongTupleUnpackViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( TupleUnpackVisitor, ) short_unpack = 'a, b = (1, 2)' short_starred_unpack = 'a, b, *rest = (1, 2, 3, 4, 5)' single_unpack = 'result = ...
option_values.max_tuple_unpack_length)
added
ba5358d381c3896b10bf6dd913dca29c3d86f9ecd772a38b2982079c3bacb912
assert_*|test_unpack_length_violation|import pytest from wemake_python_styleguide.violations.complexity import ( TooLongTupleUnpackViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( TupleUnpackVisitor, ) short_unpack = 'a, b = (1, 2)' short_starred_unpack = 'a, b, *rest = (1, 2, 3, 4, 5)...
null
null
null
wemake-services/wemake-python-styleguide
train
457
9464ed2794db00d5f71c544f4921d66d5f6ced51
train
tests/test_logic/test_complexity/test_annotations_complexity.py
train
wemake-services/wemake-python-styleguide:tests/test_logic/test_complexity/test_annotations_complexity.py
32
4
assert
test_get_annotation_compexity
import pytest from wemake_python_styleguide.logic.complexity import annotations @pytest.mark.parametrize(('annotation', 'complexity'), [ # simple annotations ('str', 1), ('int', 1), ('List', 1), ('List[str]', 2), ('List[int]', 2), ('Dict[str, int]', 2), # empty values ('Literal["...
complexity
added
7707899c7a3fa21d22a628a384c13f09b11d5c309d228189df20ead6b17fd60f
assert|test_get_annotation_compexity|import pytest from wemake_python_styleguide.logic.complexity import annotations @pytest.mark.parametrize(('annotation', 'complexity'), [ # simple annotations ('str', 1), ('int', 1), ('List', 1), ('List[str]', 2), ('List[int]', 2), ('Dict[str, int]', 2), # empty values ('Literal[""]'...
null
null
null
wemake-services/wemake-python-styleguide
train
458
f0f7ca47413c5b50b94f4db57593ab7295a6b511
train
tests/fixtures/noqa/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa/noqa.py
243
4
assert
""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from ...
test_function(3)
modified
983a38b251881cfce18f872008425420bfbf7c32123f9be45c89a42e55d16cc1
assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from .ve...
test_function(3)
242
4
wemake-services/wemake-python-styleguide
train
458
f0f7ca47413c5b50b94f4db57593ab7295a6b511
train
tests/fixtures/noqa/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa/noqa.py
244
4
assert
""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from ...
test_function(4)
modified
2503c807cb4f8fc27dd921e212ec01afc599be4f6e56dfceb7429d495333e155
assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from .ve...
test_function(4)
243
4
wemake-services/wemake-python-styleguide
train
458
f0f7ca47413c5b50b94f4db57593ab7295a6b511
train
tests/fixtures/noqa/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa/noqa.py
314
0
assert
""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from ...
hex_number
modified
0d456bf64e846b330296aff7408cf160c5efb0504595bad19d1e1b7483ec4632
assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from .ve...
hex_number
313
0
wemake-services/wemake-python-styleguide
train
458
f0f7ca47413c5b50b94f4db57593ab7295a6b511
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
296
12
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
ac45cc021b6f7d133c99ded01b36bf21c8bd448aca77a492cc65e4c35906d8d4
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
295
12
wemake-services/wemake-python-styleguide
train
458
f0f7ca47413c5b50b94f4db57593ab7295a6b511
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
383
4
assert
test_noqa_fixture_disabled_no_control
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_controlled_violations)
modified
4f796324f2a2cbb879ae0f3acbc33238a16e8ce8c4d3338aaff4199faba1f2ea
assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st...
len(all_controlled_violations)
382
4
wemake-services/wemake-python-styleguide
train
458
f0f7ca47413c5b50b94f4db57593ab7295a6b511
train
tests/test_visitors/test_ast/test_builtins/test_numbers/test_magic_numbers.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_numbers/test_magic_numbers.py
196
4
assert_*
test_magic_number_warning
import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.constants import MAGIC_NUMBERS_WHITELIST from wemake_python_styleguide.violations.best_practices import ( MagicNumberViolation, ) from wemake_python_styleguide.visitors.ast.builtins import WrongNumberVisitor # C...
[MagicNumberViolation])
modified
e8eee75be6bdee1a1259208c2aa269617be919823669f1c05635d49f6dcc955b
assert_*|test_magic_number_warning|import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.constants import MAGIC_NUMBERS_WHITELIST from wemake_python_styleguide.violations.best_practices import ( MagicNumberViolation, ) from wemake_python_styleguide.visitors.ast.builtins ...
[MagicNumberViolation])
196
4
wemake-services/wemake-python-styleguide
train
458
f0f7ca47413c5b50b94f4db57593ab7295a6b511
train
tests/test_visitors/test_ast/test_builtins/test_numbers/test_magic_numbers.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_numbers/test_magic_numbers.py
232
4
assert_*
test_magic_number_octal_warning
import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.constants import MAGIC_NUMBERS_WHITELIST from wemake_python_styleguide.violations.best_practices import ( MagicNumberViolation, ) from wemake_python_styleguide.visitors.ast.builtins import WrongNumberVisitor # C...
[MagicNumberViolation])
modified
aa97130f96a977af97403adea8de69ebe687b206e1dc389436dd6f016c2fa276
assert_*|test_magic_number_octal_warning|import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.constants import MAGIC_NUMBERS_WHITELIST from wemake_python_styleguide.violations.best_practices import ( MagicNumberViolation, ) from wemake_python_styleguide.visitors.ast.bui...
[MagicNumberViolation])
232
4
wemake-services/wemake-python-styleguide
train
458
f0f7ca47413c5b50b94f4db57593ab7295a6b511
train
tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_number_float_zero.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_number_float_zero.py
22
4
assert_*
test_float_zero
import pytest from wemake_python_styleguide.violations.consistency import FloatZeroViolation from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) def test_float_zero( parse_tokens, assert_errors, default_options, primitives_usages, mode, ): """Ens...
[FloatZeroViolation])
added
de4232c5b247a406a73df6587853637b8c09617f3e4808179fa91d802e77c63a
assert_*|test_float_zero|import pytest from wemake_python_styleguide.violations.consistency import FloatZeroViolation from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) def test_float_zero( parse_tokens, assert_errors, default_options, primitives_usages, mode, ): """Ensures t...
null
null
null
wemake-services/wemake-python-styleguide
train
459
bb318ad0f762674b8eed57ffaef38902be47f05a
train
tests/test_visitors/test_ast/test_imports/test_nested_imports.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_imports/test_nested_imports.py
74
4
assert_*
test_nested_import
import pytest from wemake_python_styleguide.violations.best_practices import ( NestedImportViolation, ) from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor # Wrong imports: nested_function_import = """ def function(): import os """ nested_function_from_import = """ def function(): ...
[NestedImportViolation])
added
0fc3ee16ed39ff1d676de5306d030ec0fd1a0076871f7457000dee00c2f2edc3
assert_*|test_nested_import|import pytest from wemake_python_styleguide.violations.best_practices import ( NestedImportViolation, ) from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor # Wrong imports: nested_function_import = """ def function(): import os """ nested_function_from_import = """ d...
null
null
null
wemake-services/wemake-python-styleguide
train
460
bf196750dfd9054ba1ed0513967f882baa7f09f2
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
297
12
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
035092ac90b6ca2a9c8726dedffd1f1a0ae81a1af0ab95863d2061cd4cc7917b
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
296
12
wemake-services/wemake-python-styleguide
train
460
bf196750dfd9054ba1ed0513967f882baa7f09f2
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
300
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
8b4a12a799587ca7cfc2397f70f23ff89e07750ab04a5d42ba2dae97075d9fe7
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
299
8
wemake-services/wemake-python-styleguide
train
460
bf196750dfd9054ba1ed0513967f882baa7f09f2
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
310
4
assert
test_codes
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_violations)
modified
ea992c44c0077aedca5a42406f68cb1cac7ad3dcc9c11ca87a715cf89804e4b3
assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a...
len(all_violations)
309
4
wemake-services/wemake-python-styleguide
train
460
bf196750dfd9054ba1ed0513967f882baa7f09f2
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
384
4
assert
test_noqa_fixture_disabled_no_control
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_controlled_violations)
modified
5dcc7f2b7c1bc40eb3b6e63b2f1d5cacc9e7788b3014d2f606ec5ddc951391d5
assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st...
len(all_controlled_violations)
383
4
wemake-services/wemake-python-styleguide
train
460
bf196750dfd9054ba1ed0513967f882baa7f09f2
train
tests/test_visitors/test_ast/test_keywords/test_raise.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_raise.py
54
4
assert_*
test_raise_not_implemented
import pytest from wemake_python_styleguide.violations.best_practices import ( BaseExceptionRaiseViolation, RaiseNotImplementedViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_exception_method = """ class CheckAbstractMethods(): def check_exception(self): ...
[RaiseNotImplementedViolation])
added
c0e2ff118001b4af5bce62ab4819b86ba93436116ce402c30e65013ba98e2e0c
assert_*|test_raise_not_implemented|import pytest from wemake_python_styleguide.violations.best_practices import ( BaseExceptionRaiseViolation, RaiseNotImplementedViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_exception_method = """ class CheckAbstractMethods(): def chec...
null
null
null
wemake-services/wemake-python-styleguide
train
460
bf196750dfd9054ba1ed0513967f882baa7f09f2
train
tests/test_visitors/test_ast/test_keywords/test_raise.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_raise.py
83
4
assert_*
test_raise_base_exception
import pytest from wemake_python_styleguide.violations.best_practices import ( BaseExceptionRaiseViolation, RaiseNotImplementedViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_exception_method = """ class CheckAbstractMethods(): def check_exception(self): ...
[BaseExceptionRaiseViolation])
added
182dbffc488d8531e1cf6409c9fbcec57ea9032b54bbf0140881b4556c7b586a
assert_*|test_raise_base_exception|import pytest from wemake_python_styleguide.violations.best_practices import ( BaseExceptionRaiseViolation, RaiseNotImplementedViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongRaiseVisitor raise_exception_method = """ class CheckAbstractMethods(): def check...
null
null
null
wemake-services/wemake-python-styleguide
train
461
94b7869c95b633a79f172d8755c4f3841fb1f031
train
tests/fixtures/external_plugins.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/external_plugins.py
15
0
assert
from sys import * import sys from typing import List, Union, Dict ++int extra_parens = list((node for node in 'abc')) some_tuple = (1, 2, ) breaking_pycodestyle=3 # commented: str = 'comment' def camelCase(): ... assert
True
modified
7d866cccd1a31f210071ce3f763fc6b3b84dbcb041f11f684b6790387efff3a6
assert||from sys import * import sys from typing import List, Union, Dict ++int extra_parens = list((node for node in 'abc')) some_tuple = (1, 2, ) breaking_pycodestyle=3 # commented: str = 'comment' def camelCase(): ... assert
True
17
0
wemake-services/wemake-python-styleguide
train
463
a95f04d920907d78f58875a8eb300aded05957a2
train
tests/fixtures/external_plugins.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/external_plugins.py
17
0
assert
from sys import * import sys from typing import List, Union, Dict ++int extra_parens = list((node for node in 'abc')) some_tuple = (1, 2, ) breaking_pycodestyle=3 # commented: str = 'comment' def camelCase(): ... '{}'.format(1) assert
True
modified
28137780eee3267189e2acd1b3cca3f96dc8e772bfebe17c8bccd8a5e13b90ad
assert||from sys import * import sys from typing import List, Union, Dict ++int extra_parens = list((node for node in 'abc')) some_tuple = (1, 2, ) breaking_pycodestyle=3 # commented: str = 'comment' def camelCase(): ... '{}'.format(1) assert
True
15
0
wemake-services/wemake-python-styleguide
train
465
f2f677681dca543587ea316395fb9cf95c1c6745
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
64
4
assert_*
test_meaningless_math
import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.mark.parametrize('expression', [ # Math ops: '*= 0', ...
[MeaninglessNumberOperationViolation])
added
2ba74d19c5a443b2c0510cd7712541c120928a84e2a21dee027f404b9b1c6c8d
assert_*|test_meaningless_math|import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.mark.parametrize('expression', [ # Math ops: ...
null
null
null
wemake-services/wemake-python-styleguide
train
465
f2f677681dca543587ea316395fb9cf95c1c6745
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
154
4
assert_*
test_divide_by_one
import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.mark.parametrize('expression', [ # Math ops: '*= 0', ...
[MeaninglessNumberOperationViolation])
added
965e983cbdd07e657a6f7a4356fcb49e50ba08cadcf8d4fa6ca827f69f767cce
assert_*|test_divide_by_one|import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.mark.parametrize('expression', [ # Math ops: '*=...
null
null
null
wemake-services/wemake-python-styleguide
train
465
f2f677681dca543587ea316395fb9cf95c1c6745
train
tests/test_visitors/test_ast/test_operators/test_zero_div.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_operators/test_zero_div.py
57
4
assert_*
test_zero_div
import pytest from wemake_python_styleguide.violations.consistency import ( ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.mark.parametrize('expression', [ '/= 0', '/= 0.0', '/= -0', '/...
[ZeroDivisionViolation])
added
8478448c6c20b6fe4da7bb238af75462401a2ae6e138f552b33b1e11df9e4906
assert_*|test_zero_div|import pytest from wemake_python_styleguide.violations.consistency import ( ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.mark.parametrize('expression', [ '/= 0', '/= 0.0', '/= -0', '/= -0....
null
null
null
wemake-services/wemake-python-styleguide
train
465
f2f677681dca543587ea316395fb9cf95c1c6745
train
tests/test_visitors/test_ast/test_operators/test_zero_div.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_operators/test_zero_div.py
102
4
assert_*
test_zero_mod
import pytest from wemake_python_styleguide.violations.consistency import ( ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.mark.parametrize('expression', [ '/= 0', '/= 0.0', '/= -0', '/...
[ZeroDivisionViolation])
added
ed08d7b7dc60d65b9cd95f9bc4b8f8e46c7a57bd72323c834fa9ad28f303a543
assert_*|test_zero_mod|import pytest from wemake_python_styleguide.violations.consistency import ( ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.mark.parametrize('expression', [ '/= 0', '/= 0.0', '/= -0', '/= -0....
null
null
null
wemake-services/wemake-python-styleguide
train
466
9879a18acafc691db215afb7c42dceb9a365a604
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
298
12
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
48cf9e72d9556123618e83077c632194609389df049ecfa98b8e2f280610116f
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
297
12
wemake-services/wemake-python-styleguide
train
466
9879a18acafc691db215afb7c42dceb9a365a604
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
301
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
792b75adcb8ad3dc0276afb5f66db579e761f79d129efd6d05b35e58f308f6e4
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
300
8
wemake-services/wemake-python-styleguide
train
466
9879a18acafc691db215afb7c42dceb9a365a604
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
311
4
assert
test_codes
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_violations)
modified
f815879dec048cb8f50a75349dbc28ffd8000007ecd5a4122b3c0479e67e7771
assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a...
len(all_violations)
310
4
wemake-services/wemake-python-styleguide
train
466
9879a18acafc691db215afb7c42dceb9a365a604
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
385
4
assert
test_noqa_fixture_disabled_no_control
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_controlled_violations)
modified
230d47a13f22e5cd0d991ae69a2b5be0e86c90c49a7484c0667913b1766b3fd7
assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st...
len(all_controlled_violations)
384
4
wemake-services/wemake-python-styleguide
train
466
9879a18acafc691db215afb7c42dceb9a365a604
train
tests/test_visitors/test_ast/test_exceptions/test_except_block_expression.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_exceptions/test_except_block_expression.py
69
4
assert_*
test_use_base_exception
import pytest from wemake_python_styleguide.violations.best_practices import ( NonTrivialExceptViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongExceptHandlerVisitor, ) use_complex_expression = """ try: ... except ValueError or TypeError: ... """ use_name_expression = "...
[NonTrivialExceptViolation])
added
00fb75fb17b991c810326aa315446d271fc3776c5c70254649dc5cb2bc7e2d2f
assert_*|test_use_base_exception|import pytest from wemake_python_styleguide.violations.best_practices import ( NonTrivialExceptViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongExceptHandlerVisitor, ) use_complex_expression = """ try: ... except ValueError or TypeError: ... """ use_name_...
null
null
null
wemake-services/wemake-python-styleguide
train
467
5e6aa42023d261cfc0b043d7e59bc5d486754bba
train
tests/test_visitors/test_ast/test_complexity/test_overuses/test_overused_string.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_overuses/test_overused_string.py
159
4
assert_*
test_string_overuse
import pytest from wemake_python_styleguide.violations.complexity import ( OverusedStringViolation, ) from wemake_python_styleguide.visitors.ast.complexity.overuses import ( StringOveruseVisitor, ) string_actions = """ first = {0} second({0}) third[{0}] 'new' + {0} {0}.join("1", "2", "3") """ string_function...
[OverusedStringViolation])
modified
731b764f8532e3e67a4b9446668e6d23291fbe677d0040f409902bf8496f285a
assert_*|test_string_overuse|import pytest from wemake_python_styleguide.violations.complexity import ( OverusedStringViolation, ) from wemake_python_styleguide.visitors.ast.complexity.overuses import ( StringOveruseVisitor, ) string_actions = """ first = {0} second({0}) third[{0}] 'new' + {0} {0}.join("1", "2", "3") "...
[OverusedStringViolation])
160
4
wemake-services/wemake-python-styleguide
train
467
5e6aa42023d261cfc0b043d7e59bc5d486754bba
train
tests/test_visitors/test_ast/test_complexity/test_overuses/test_overused_string.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_overuses/test_overused_string.py
160
4
assert_*
test_string_overuse
import pytest from wemake_python_styleguide.violations.complexity import ( OverusedStringViolation, ) from wemake_python_styleguide.visitors.ast.complexity.overuses import ( StringOveruseVisitor, ) string_actions = """ first = {0} second({0}) third[{0}] 'new' + {0} {0}.join("1", "2", "3") """ string_function...
default_options.max_string_usages)
modified
2d689bd0840294ea9231d8a9618d4f8a11376242c2ddaf602a0e60ed845744a9
assert_*|test_string_overuse|import pytest from wemake_python_styleguide.violations.complexity import ( OverusedStringViolation, ) from wemake_python_styleguide.visitors.ast.complexity.overuses import ( StringOveruseVisitor, ) string_actions = """ first = {0} second({0}) third[{0}] 'new' + {0} {0}.join("1", "2", "3") "...
default_options.max_string_usages)
161
4
wemake-services/wemake-python-styleguide
train
468
cad16b562e4491a10f635254cb775c37e991e6f3
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
302
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
36cc6294ea8d4117c5d704c109fd335c3ef177da9e44dd5979b65857d7d5fa20
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
301
8
wemake-services/wemake-python-styleguide
train
468
cad16b562e4491a10f635254cb775c37e991e6f3
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
303
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors.get(found_error)
modified
bce92766bf77cc35d3f1b21c3e79760bf31f00ee3a0173ce7e3f6a9b24ff0cc0
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors.get(found_error)
302
8
wemake-services/wemake-python-styleguide
train
468
cad16b562e4491a10f635254cb775c37e991e6f3
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
312
4
assert
test_codes
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_violations)
modified
c3d23123923609aa27c6b34b5c7938aaa8aa32aa1e7ecd5401cd2358340519fd
assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a...
len(all_violations)
311
4
wemake-services/wemake-python-styleguide
train
468
cad16b562e4491a10f635254cb775c37e991e6f3
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
386
4
assert
test_noqa_fixture_disabled_no_control
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_controlled_violations)
modified
dfa0e4198139cd9e8116f563b5fb1fc6d17825df80a5187102f9966cb3537903
assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st...
len(all_controlled_violations)
385
4
wemake-services/wemake-python-styleguide
train
468
cad16b562e4491a10f635254cb775c37e991e6f3
train
tests/test_visitors/test_ast/test_functions/test_floating_nan.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_floating_nan.py
70
4
assert_*
test_floating_nan
import pytest from wemake_python_styleguide.violations.best_practices import ( FloatingNanViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FloatingNanCallVisitor, ) @pytest.mark.parametrize('code', [ 'float(4.5) + 4.2', 'float(2) + 0', 'result = "NaN".join(["a", "a"])', ...
[FloatingNanViolation])
added
09c9142ba163ca50477c81568be8cff1ed256df569f696272ee53e6661447abb
assert_*|test_floating_nan|import pytest from wemake_python_styleguide.violations.best_practices import ( FloatingNanViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FloatingNanCallVisitor, ) @pytest.mark.parametrize('code', [ 'float(4.5) + 4.2', 'float(2) + 0', 'result = "NaN".join(["a", "a"]...
null
null
null
wemake-services/wemake-python-styleguide
train
469
533c339a924a2c7dfc3f2858cccc0e3c8e619000
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
300
12
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
5526513cd20f548a9f271a118bb169129b2860547056ab424600eb4d784a2ca7
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
299
12
wemake-services/wemake-python-styleguide
train
469
533c339a924a2c7dfc3f2858cccc0e3c8e619000
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
313
4
assert
test_codes
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_violations)
modified
c2a47c1be65c6a14711fe6ffb268d0c05a4da5367cd4c341b08117556ac4d0ca
assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a...
len(all_violations)
312
4
wemake-services/wemake-python-styleguide
train
469
533c339a924a2c7dfc3f2858cccc0e3c8e619000
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
387
4
assert
test_noqa_fixture_disabled_no_control
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_controlled_violations)
modified
03ccbc1729af679c31f59a58ea664ad52d348dabbe57f99d72d6c075f5d59c66
assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st...
len(all_controlled_violations)
386
4
wemake-services/wemake-python-styleguide
train
469
533c339a924a2c7dfc3f2858cccc0e3c8e619000
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
113
4
assert_*
test_else_that_can_be_removed_and_complex_if
import pytest from wemake_python_styleguide.violations.refactoring import ( SimplifiableReturningIfViolation, UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor function_level_condition = """ def function(): if some_condition: {0} e...
[UselessReturningElseViolation])
added
2a102c0a0a78ad294b768b12d837965b1673e3a2f7be784e6490adde6e6e7e66
assert_*|test_else_that_can_be_removed_and_complex_if|import pytest from wemake_python_styleguide.violations.refactoring import ( SimplifiableReturningIfViolation, UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor function_level_condition = """ def function...
null
null
null
wemake-services/wemake-python-styleguide
train
469
533c339a924a2c7dfc3f2858cccc0e3c8e619000
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
189
4
assert_*
test_else_that_can_be_removed_in_module
import pytest from wemake_python_styleguide.violations.refactoring import ( SimplifiableReturningIfViolation, UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor function_level_condition = """ def function(): if some_condition: {0} e...
[UselessReturningElseViolation])
added
555595ecab20986289db6dff0c5788e5201b3efd98b322d27d700b49dc7ece8c
assert_*|test_else_that_can_be_removed_in_module|import pytest from wemake_python_styleguide.violations.refactoring import ( SimplifiableReturningIfViolation, UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor function_level_condition = """ def function(): i...
null
null
null
wemake-services/wemake-python-styleguide
train
469
533c339a924a2c7dfc3f2858cccc0e3c8e619000
train
tests/test_visitors/test_ast/test_conditions/test_simplifiable_if_statements.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_simplifiable_if_statements.py
125
4
assert_*
test_simplifiable_early_returning_if
import pytest from wemake_python_styleguide.violations.refactoring import ( SimplifiableReturningIfViolation, UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor complex_else = """ def some_function(): if some_condition: return {0} e...
[SimplifiableReturningIfViolation])
added
1e47d0bab0da19f6cfcd70ff684c082e511382ae12152f59f7f5f31b2ed344e6
assert_*|test_simplifiable_early_returning_if|import pytest from wemake_python_styleguide.violations.refactoring import ( SimplifiableReturningIfViolation, UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor complex_else = """ def some_function(): if some_con...
null
null
null
wemake-services/wemake-python-styleguide
train
469
533c339a924a2c7dfc3f2858cccc0e3c8e619000
train
tests/test_visitors/test_ast/test_conditions/test_simplifiable_if_statements.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_simplifiable_if_statements.py
144
4
assert_*
test_complex_else
import pytest from wemake_python_styleguide.violations.refactoring import ( SimplifiableReturningIfViolation, UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor complex_else = """ def some_function(): if some_condition: return {0} e...
[UselessReturningElseViolation])
added
8f8c9023abb30fa982ae4f46d7084b7fb147b98fb7c444c41365657a1fadce80
assert_*|test_complex_else|import pytest from wemake_python_styleguide.violations.refactoring import ( SimplifiableReturningIfViolation, UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor complex_else = """ def some_function(): if some_condition: return {0} ...
null
null
null
wemake-services/wemake-python-styleguide
train
469
533c339a924a2c7dfc3f2858cccc0e3c8e619000
train
tests/test_visitors/test_ast/test_conditions/test_simplifiable_if_statements.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_simplifiable_if_statements.py
163
4
assert_*
test_not_simplifiable_elif
import pytest from wemake_python_styleguide.violations.refactoring import ( SimplifiableReturningIfViolation, UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor complex_else = """ def some_function(): if some_condition: return {0} e...
[UselessReturningElseViolation])
added
e25fa533a1c36585d3dc93541510106d105518ced7291c03bc6ec78301be5a1d
assert_*|test_not_simplifiable_elif|import pytest from wemake_python_styleguide.violations.refactoring import ( SimplifiableReturningIfViolation, UselessReturningElseViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor complex_else = """ def some_function(): if some_condition: re...
null
null
null
wemake-services/wemake-python-styleguide
train
470
dffa5cb10e38edfd52d950ede9204469f8835b97
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
135
4
assert_*
test_implicit_elif_statements
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_expression_in_else = """ ...
[ImplicitElifViolation])
added
e7c7e7de448b59652655fee7fd8991e94b2dc48a0b2ad3facce25351e2e44db8
assert_*|test_implicit_elif_statements|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_expression...
null
null
null
wemake-services/wemake-python-styleguide
train
471
b65ee2b22d85bca45f7bfd4e98a537ac170fc77b
train
tests/test_visitors/test_decorators/test_alias_decorator.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_decorators/test_alias_decorator.py
22
9
pytest.raises
test_useless_alias
import pytest from wemake_python_styleguide.visitors.decorators import alias class _HasAliasedProp(object): def existing(self): """Existing.""" def first(self): """First.""" def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" with pyte...
ValueError, match='duplicate')
modified
b746f48f45ad8a08e6f82cf57bc939d7dcabd89b871e6a06946ca9e960105f60
pytest.raises|test_useless_alias|import pytest from wemake_python_styleguide.visitors.decorators import alias class _HasAliasedProp(object): def existing(self): """Existing.""" def first(self): """First.""" def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" with pytest.ra...
ValueError, match='duplicate')
22
9
wemake-services/wemake-python-styleguide
train
471
b65ee2b22d85bca45f7bfd4e98a537ac170fc77b
train
tests/test_visitors/test_decorators/test_alias_decorator.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_decorators/test_alias_decorator.py
28
9
pytest.raises
test_raises_for_missing_alias
import pytest from wemake_python_styleguide.visitors.decorators import alias class _HasAliasedProp(object): def existing(self): """Existing.""" def first(self): """First.""" def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" with pyte...
AttributeError)
modified
d0da998832b661294ffd48d88e31ac9b8f4e0ed86ab1885d6b4339051c088f64
pytest.raises|test_raises_for_missing_alias|import pytest from wemake_python_styleguide.visitors.decorators import alias class _HasAliasedProp(object): def existing(self): """Existing.""" def first(self): """First.""" def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" wit...
AttributeError)
28
9
wemake-services/wemake-python-styleguide
train
471
b65ee2b22d85bca45f7bfd4e98a537ac170fc77b
train
tests/test_visitors/test_decorators/test_alias_decorator.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_decorators/test_alias_decorator.py
34
9
pytest.raises
test_raises_for_existing_alias
import pytest from wemake_python_styleguide.visitors.decorators import alias class _HasAliasedProp(object): def existing(self): """Existing.""" def first(self): """First.""" def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" with pyte...
AttributeError)
modified
08ad91e959beb2c973ca5274f1e1521ff94324e8cb91afea70a00409530752d3
pytest.raises|test_raises_for_existing_alias|import pytest from wemake_python_styleguide.visitors.decorators import alias class _HasAliasedProp(object): def existing(self): """Existing.""" def first(self): """First.""" def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" wi...
AttributeError)
34
9
wemake-services/wemake-python-styleguide
train
472
77940cee8a59555cc43920c7cec586c4204857ba
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
301
12
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
d9b4f30ce7d67d760a6652a9ba69652ff050e59cd7082b5a6cab5deaa65a54f0
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
300
12
wemake-services/wemake-python-styleguide
train
472
77940cee8a59555cc43920c7cec586c4204857ba
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
304
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
54d3f135cf7c41ecf83f0648a9941f6984168af2f5a0b079de9c8947ae9a6a93
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
303
8
wemake-services/wemake-python-styleguide
train
472
77940cee8a59555cc43920c7cec586c4204857ba
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
314
4
assert
test_codes
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_violations)
modified
fe3d7f41026c448d94181fc545785afcc938f18d7b16bf62e97da913b3149a78
assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a...
len(all_violations)
313
4
wemake-services/wemake-python-styleguide
train
472
77940cee8a59555cc43920c7cec586c4204857ba
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
388
4
assert
test_noqa_fixture_disabled_no_control
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_controlled_violations)
modified
b3493a06a571adc2a98a6ef8e5d0f9d6719fee3f94b8c9163701a895efebbffe
assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st...
len(all_controlled_violations)
387
4
wemake-services/wemake-python-styleguide
train
472
77940cee8a59555cc43920c7cec586c4204857ba
train
tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_to_list.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_to_list.py
96
4
assert_*
test_unpacking_to_list
import pytest from wemake_python_styleguide.violations.best_practices import ( MultipleAssignmentsViolation, WrongUnpackingViolation, ) from wemake_python_styleguide.violations.consistency import ( UnpackingIterableToListViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongAss...
[UnpackingIterableToListViolation])
added
57217419fda7be139e4e5523cdee4aca22d98217b6c4105eed79d9f107741454
assert_*|test_unpacking_to_list|import pytest from wemake_python_styleguide.violations.best_practices import ( MultipleAssignmentsViolation, WrongUnpackingViolation, ) from wemake_python_styleguide.violations.consistency import ( UnpackingIterableToListViolation, ) from wemake_python_styleguide.visitors.ast.builtins im...
null
null
null
wemake-services/wemake-python-styleguide
train
472
77940cee8a59555cc43920c7cec586c4204857ba
train
tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_to_list.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_to_list.py
130
4
assert_*
test_unpacking_to_nested_list
import pytest from wemake_python_styleguide.violations.best_practices import ( MultipleAssignmentsViolation, WrongUnpackingViolation, ) from wemake_python_styleguide.violations.consistency import ( UnpackingIterableToListViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongAss...
[UnpackingIterableToListViolation, WrongUnpackingViolation])
added
dd03f88e60eb61f75c6495f55fb2b09284ef1b7c38534646add22b2454c08009
assert_*|test_unpacking_to_nested_list|import pytest from wemake_python_styleguide.violations.best_practices import ( MultipleAssignmentsViolation, WrongUnpackingViolation, ) from wemake_python_styleguide.violations.consistency import ( UnpackingIterableToListViolation, ) from wemake_python_styleguide.visitors.ast.buil...
null
null
null
wemake-services/wemake-python-styleguide
train
472
77940cee8a59555cc43920c7cec586c4204857ba
train
tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_to_list.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_to_list.py
160
4
assert_*
test_unpacking_to_list_in_middle_target
import pytest from wemake_python_styleguide.violations.best_practices import ( MultipleAssignmentsViolation, WrongUnpackingViolation, ) from wemake_python_styleguide.violations.consistency import ( UnpackingIterableToListViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongAss...
[MultipleAssignmentsViolation, UnpackingIterableToListViolation])
added
a069cc411cc1df391b70f1a1078f901f60d3c211d7dd75a8edcc0717e81bbc39
assert_*|test_unpacking_to_list_in_middle_target|import pytest from wemake_python_styleguide.violations.best_practices import ( MultipleAssignmentsViolation, WrongUnpackingViolation, ) from wemake_python_styleguide.violations.consistency import ( UnpackingIterableToListViolation, ) from wemake_python_styleguide.visitor...
null
null
null
wemake-services/wemake-python-styleguide
train
473
1af8d018ff81a342d2104a76cd9b4b6a20e45fc9
train
tests/fixtures/noqa/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa/noqa.py
242
4
assert
""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from ...
test_function(1)
modified
83a6edc25ed6d6bdac83077fab2f177db0f2b6a01bc5290d1d1246414592f10b
assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from .ve...
test_function(1)
241
4
wemake-services/wemake-python-styleguide
train
473
1af8d018ff81a342d2104a76cd9b4b6a20e45fc9
train
tests/fixtures/noqa/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa/noqa.py
243
4
assert
""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from ...
test_function(2)
modified
8b2b5d48c10f6ac21a2f49eb51ea1c1a49681d59ebc54c862a3d702ae5bd273a
assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from .ve...
test_function(2)
242
4
wemake-services/wemake-python-styleguide
train
473
1af8d018ff81a342d2104a76cd9b4b6a20e45fc9
train
tests/fixtures/noqa/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa/noqa.py
245
4
assert
""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from ...
test_function(4)
modified
8a95ebf5211a47a73ab39319296d088d3e1ff0503122d5ec3b8c265f704eb9d1
assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from .ve...
test_function(4)
244
4
wemake-services/wemake-python-styleguide
train
473
1af8d018ff81a342d2104a76cd9b4b6a20e45fc9
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
302
12
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
16b957a9ab6a4cc9d262998d10957d18dae9c15b281522258f38c3615ce8abb0
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
301
12
wemake-services/wemake-python-styleguide
train
473
1af8d018ff81a342d2104a76cd9b4b6a20e45fc9
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
306
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors.get(found_error)
modified
63b8efe1d74b86c3f995860e74fc96bffcd6254d850a8926d986dc318baec148
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors.get(found_error)
305
8
wemake-services/wemake-python-styleguide
train
473
1af8d018ff81a342d2104a76cd9b4b6a20e45fc9
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
315
4
assert
test_codes
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_violations)
modified
365d581c04759bfbee7516d2771d4d93fbfd3a619989e58ef75628f5e37734cb
assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a...
len(all_violations)
314
4
wemake-services/wemake-python-styleguide
train
473
1af8d018ff81a342d2104a76cd9b4b6a20e45fc9
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
389
4
assert
test_noqa_fixture_disabled_no_control
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_controlled_violations)
modified
8662f8a058dac17d9f0ceb257fb1f37cf23752d23ced758938c6cbb4000217d6
assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st...
len(all_controlled_violations)
388
4
wemake-services/wemake-python-styleguide
train
473
1af8d018ff81a342d2104a76cd9b4b6a20e45fc9
train
tests/test_visitors/test_ast/test_functions/test_wrong_descriptors.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_wrong_descriptors.py
107
4
assert_*
test_method_decorators_incorrect
import pytest from wemake_python_styleguide.violations.oop import ( WrongDescriptorDecoratorViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) # Correct: correct_decorator1 = """ class Test(object): @classmethod def method(cls): ... """ correct_de...
[WrongDescriptorDecoratorViolation])
added
c99397b103ebfb336c1d4543dc1a8ce428230bb35c3d7f59a84e0555d2d696a4
assert_*|test_method_decorators_incorrect|import pytest from wemake_python_styleguide.violations.oop import ( WrongDescriptorDecoratorViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) # Correct: correct_decorator1 = """ class Test(object): @classmethod def method(cl...
null
null
null
wemake-services/wemake-python-styleguide
train
474
033048a3abe7cb188241e2f4735ebebb6e90183d
train
tests/test_visitors/test_ast/test_functions/test_complex_default_values.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_complex_default_values.py
110
4
assert_*
test_wrong_function_defaults
import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.violations.best_practices import ( ComplexDefaultValueViolation, PositionalOnlyArgumentsViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionArgumentsVisitor, ) function_wit...
[ComplexDefaultValueViolation])
added
bffe3778d24803559f4f0623eef8b163cf6b98442fd304af50c80900b9bf57a2
assert_*|test_wrong_function_defaults|import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.violations.best_practices import ( ComplexDefaultValueViolation, PositionalOnlyArgumentsViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionArgument...
null
null
null
wemake-services/wemake-python-styleguide
train
474
033048a3abe7cb188241e2f4735ebebb6e90183d
train
tests/test_visitors/test_ast/test_functions/test_positional_only.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_positional_only.py
99
4
assert_*
test_posonyargs
import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.violations.best_practices import ( PositionalOnlyArgumentsViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionArgumentsVisitor, ) # Correct: correct_lambda = 'lambda x, *args, ...
[PositionalOnlyArgumentsViolation])
modified
93d569a7c2c055e57375444cca0b9dd08652f2b51165b128b3033c654c2b2610
assert_*|test_posonyargs|import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.violations.best_practices import ( PositionalOnlyArgumentsViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionArgumentsVisitor, ) # Correct: correct_lambda = 'la...
[PositionalOnlyArgumentsViolation])
99
4
wemake-services/wemake-python-styleguide
train
475
34b900473e4341f209ec83b2770f1cfed9e2b41a
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
306
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors
modified
e1137df98ead4e54c1b444b72913514601034223b36ac8e4260b47df9f4d7f7e
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors
305
8
wemake-services/wemake-python-styleguide
train
475
34b900473e4341f209ec83b2770f1cfed9e2b41a
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
307
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors.get(found_error)
modified
ebcb774b0bd98727f791cde601cba7b2868a0fe0f410e375bb2e75266f772a3f
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors.get(found_error)
306
8
wemake-services/wemake-python-styleguide
train
475
34b900473e4341f209ec83b2770f1cfed9e2b41a
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
316
4
assert
test_codes
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_violations)
modified
b112f167d09f6c87c8ba5668403acdf43a9105348d82b49b52b88e395c75d569
assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a...
len(all_violations)
315
4
wemake-services/wemake-python-styleguide
train
475
34b900473e4341f209ec83b2770f1cfed9e2b41a
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
390
4
assert
test_noqa_fixture_disabled_no_control
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_controlled_violations)
modified
8e8da66ae76fe875bccbad1f387a278c86ee81ca74ec5ee9fb141aec37977ca3
assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st...
len(all_controlled_violations)
389
4
wemake-services/wemake-python-styleguide
train
475
34b900473e4341f209ec83b2770f1cfed9e2b41a
train
tests/test_visitors/test_ast/test_loops/test_loops/test_infinite_while_loops.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_loops/test_infinite_while_loops.py
159
4
assert_*
test_wrong_while_loops
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( InfiniteWhileLoopViolation, ) from wemake_python_styleguide.visitors.ast.loops import WrongLoopVisitor template_simple = """ while True: {0} """ template_nested_while1 = """ while True: while other: ...
[InfiniteWhileLoopViolation])
added
21fc77038d8cee68fc813136c5020d1176993f96718190ff1af36ca6d85d8c6f
assert_*|test_wrong_while_loops|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( InfiniteWhileLoopViolation, ) from wemake_python_styleguide.visitors.ast.loops import WrongLoopVisitor template_simple = """ while True: {0} """ template_nested_while1 = """ while True:...
null
null
null
wemake-services/wemake-python-styleguide
train
475
34b900473e4341f209ec83b2770f1cfed9e2b41a
train
tests/test_visitors/test_ast/test_loops/test_loops/test_infinite_while_loops.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_loops/test_infinite_while_loops.py
206
4
assert_*
test_double_while_wrong_loops
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( InfiniteWhileLoopViolation, ) from wemake_python_styleguide.visitors.ast.loops import WrongLoopVisitor template_simple = """ while True: {0} """ template_nested_while1 = """ while True: while other: ...
[InfiniteWhileLoopViolation])
added
42a82d93e4a5fedc68ef74a02d2294b39eeee43d8ffbb50d000ecd5a50147c5f
assert_*|test_double_while_wrong_loops|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( InfiniteWhileLoopViolation, ) from wemake_python_styleguide.visitors.ast.loops import WrongLoopVisitor template_simple = """ while True: {0} """ template_nested_while1 = """ whil...
null
null
null
wemake-services/wemake-python-styleguide
train
475
34b900473e4341f209ec83b2770f1cfed9e2b41a
train
tests/test_visitors/test_ast/test_loops/test_loops/test_lambda_in_loop.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_loops/test_lambda_in_loop.py
112
4
assert_*
test_lambda_body
import pytest from wemake_python_styleguide.violations.best_practices import ( LambdaInsideLoopViolation, ) from wemake_python_styleguide.visitors.ast.loops import WrongLoopVisitor # Wrong: lambda_inside_for_loop = """ def wrapper(): for index in range(10): print(lambda: index) """ nested_lambda_ins...
[LambdaInsideLoopViolation])
modified
0e7dfb30ed3dc65b9403e10a669735a250cc8e8a4c4e7cfc9617ad757261a7e0
assert_*|test_lambda_body|import pytest from wemake_python_styleguide.violations.best_practices import ( LambdaInsideLoopViolation, ) from wemake_python_styleguide.visitors.ast.loops import WrongLoopVisitor # Wrong: lambda_inside_for_loop = """ def wrapper(): for index in range(10): print(lambda: index) """ nested_lamb...
[LambdaInsideLoopViolation])
110
4
wemake-services/wemake-python-styleguide
train
475
34b900473e4341f209ec83b2770f1cfed9e2b41a
train
tests/test_visitors/test_ast/test_loops/test_loops/test_useless_conitue.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_loops/test_useless_conitue.py
63
4
assert_*
test_wrong_continue_in_loop
import pytest from wemake_python_styleguide.violations.consistency import ( UselessContinueViolation, ) from wemake_python_styleguide.visitors.ast.loops import WrongLoopVisitor # Correct: correct_for_loop = """ def wrapper(): for number in [123]: if number < 0: continue print(numb...
[UselessContinueViolation])
added
86d8c812a30e43ea86f6c49f2f02c797c60a820ecca19aeffe31fa4b044e7ece
assert_*|test_wrong_continue_in_loop|import pytest from wemake_python_styleguide.violations.consistency import ( UselessContinueViolation, ) from wemake_python_styleguide.visitors.ast.loops import WrongLoopVisitor # Correct: correct_for_loop = """ def wrapper(): for number in [123]: if number < 0: continue print(number...
null
null
null
wemake-services/wemake-python-styleguide
train
476
9dd22ac258f6a6179d46aff7c6bd0f72c797d772
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
308
8
assert
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
errors.get(found_error)
modified
86aa70955e0424d7a42b8c4a2a2766b15f6903f2de181133459123785a956264
assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib...
errors.get(found_error)
307
8
wemake-services/wemake-python-styleguide
train
476
9dd22ac258f6a6179d46aff7c6bd0f72c797d772
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
391
4
assert
test_noqa_fixture_disabled_no_control
""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing...
len(all_controlled_violations)
modified
1bbfd6bd90e834655096b2c54d7388c3e40680a76be3d4ad0e18574f341ef6ae
assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st...
len(all_controlled_violations)
390
4
wemake-services/wemake-python-styleguide
train
476
9dd22ac258f6a6179d46aff7c6bd0f72c797d772
train
tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_string_modifier.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_string_modifier.py
77
4
assert_*
test_uppercase_prefix
import pytest from wemake_python_styleguide.violations.consistency import ( RawStringNotNeededViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @pytest.mark.parametrize('modifier', [ 'r', 'rb', 'fr', ...
[UppercaseStringModifierViolation])
added
335889c1d6a2d64d56db2acfb817dc52bb644a27e00f586b60aaaa4f50fec316
assert_*|test_uppercase_prefix|import pytest from wemake_python_styleguide.violations.consistency import ( RawStringNotNeededViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @pytest.mark.parametrize('modifier', [ 'r', 'rb', 'fr...
null
null
null
wemake-services/wemake-python-styleguide
train
476
9dd22ac258f6a6179d46aff7c6bd0f72c797d772
train
tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_string_modifier.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_string_modifier.py
82
4
assert_*
test_uppercase_prefix
import pytest from wemake_python_styleguide.violations.consistency import ( RawStringNotNeededViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @pytest.mark.parametrize('modifier', [ 'r', 'rb', 'fr', ...
modifier)
added
651ca487000209c3d34a774c641fb5c3f6d618fb74be1afd14733a924eabc59c
assert_*|test_uppercase_prefix|import pytest from wemake_python_styleguide.violations.consistency import ( RawStringNotNeededViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @pytest.mark.parametrize('modifier', [ 'r', 'rb', 'fr...
null
null
null
wemake-services/wemake-python-styleguide
train
476
9dd22ac258f6a6179d46aff7c6bd0f72c797d772
train
tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_string_modifier.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_string_modifier.py
113
4
assert_*
test_uppercase_prefix_multiple
import pytest from wemake_python_styleguide.violations.consistency import ( RawStringNotNeededViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @pytest.mark.parametrize('modifier', [ 'r', 'rb', 'fr', ...
[ UppercaseStringModifierViolation, UppercaseStringModifierViolation, RawStringNotNeededViolation, ])
added
00568b6f7ad9b85133416a43e5ce9599af95a5aa0c69bb77fc8230d9c2ebb904
assert_*|test_uppercase_prefix_multiple|import pytest from wemake_python_styleguide.violations.consistency import ( RawStringNotNeededViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @pytest.mark.parametrize('modifier', [ 'r', ...
null
null
null