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
152
47e762aaffb065b535849f14a9d6839378503980
train
tests/test_visitors/test_ast/test_keywords/test_try_except/test_finally_return_path.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_try_except/test_finally_return_path.py
169
4
assert_*
test_wrong_return_in_else_or_finally
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( TryExceptMultipleReturnPathViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongTryExceptVisitor, ) # Correct: right_both_return = """ def function(): try: return 1 / ...
[TryExceptMultipleReturnPathViolation])
added
40b7033d1296ed2bf43217668c8c5a6e89808bd4e50f17f0def41264507eed6b
assert_*|test_wrong_return_in_else_or_finally|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( TryExceptMultipleReturnPathViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongTryExceptVisitor, ) # Correct: right_both_return = """ def functi...
null
null
null
wemake-services/wemake-python-styleguide
train
152
47e762aaffb065b535849f14a9d6839378503980
train
tests/test_visitors/test_ast/test_keywords/test_try_except/test_finally_return_path.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_try_except/test_finally_return_path.py
183
4
assert_*
test_double_wrong_return_in_else_or_finally
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( TryExceptMultipleReturnPathViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongTryExceptVisitor, ) # Correct: right_both_return = """ def function(): try: return 1 / ...
[ TryExceptMultipleReturnPathViolation, TryExceptMultipleReturnPathViolation, ])
added
1905004463a301030411dfae056479fe9368f99ad345a6ea55ddd83988365516
assert_*|test_double_wrong_return_in_else_or_finally|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( TryExceptMultipleReturnPathViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongTryExceptVisitor, ) # Correct: right_both_return = """ def...
null
null
null
wemake-services/wemake-python-styleguide
train
152
47e762aaffb065b535849f14a9d6839378503980
train
tests/test_visitors/test_ast/test_keywords/test_try_except/test_try_finally.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_try_except/test_try_finally.py
62
4
assert_*
test_wrong_finally
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( RedundantFinallyViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongTryExceptVisitor, ) right_try_example = """ try: ... except: ... """ wrong_try_example = """ try: ...
[RedundantFinallyViolation])
added
270718460acedc154f44df3d0a6b3798612fdf64c572d721cc5435d541f1c4e8
assert_*|test_wrong_finally|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( RedundantFinallyViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongTryExceptVisitor, ) right_try_example = """ try: ... except: ... """ wrong_try_example = """ t...
null
null
null
wemake-services/wemake-python-styleguide
train
153
fce0dcbc79b030bae58de9da09777be07e6c6803
train
tests/test_visitors/test_ast/test_imports/test_dotted_raw_import.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_imports/test_dotted_raw_import.py
39
4
assert_*
test_wrong_dotted_import
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( DottedRawImportViolation, ) from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor regular_import = 'import {0}' regular_import_with_alias = 'import {0} as alias' from_import = 'from {0} impo...
to_import)
modified
cfd09bfc821791bbf7651920654fa9ec2674c31b5f5747f9a51a00c3a1f775cb
assert_*|test_wrong_dotted_import|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( DottedRawImportViolation, ) from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor regular_import = 'import {0}' regular_import_with_alias = 'import {0} as alias' f...
to_import)
39
4
wemake-services/wemake-python-styleguide
train
153
fce0dcbc79b030bae58de9da09777be07e6c6803
train
tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_number_suffixes.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_number_suffixes.py
38
4
assert_*
test_bad_number_suffixes
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( BadNumberSuffixViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) @pytest.mark.parametrize('number', [ '0XFF', '1.5E+10', '0O11', '0B10...
[BadNumberSuffixViolation])
added
63f0168d48bc1fd00120df592c9b9f494dd394cfe26ed62048e617d976530b62
assert_*|test_bad_number_suffixes|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( BadNumberSuffixViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) @pytest.mark.parametrize('number', [ '0XFF', '1.5E+10', '0O11',...
null
null
null
wemake-services/wemake-python-styleguide
train
153
fce0dcbc79b030bae58de9da09777be07e6c6803
train
tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_partial_floats.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_partial_floats.py
37
4
assert_*
test_partial_float
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( PartialFloatViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) @pytest.mark.parametrize('primitive', [ '10.', '.05', '.0', '0.', '-...
primitive.replace('-', ''))
modified
5e10e97da8f4fe172789684507402258c96174316bcf70c5e0b204b527855a86
assert_*|test_partial_float|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( PartialFloatViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) @pytest.mark.parametrize('primitive', [ '10.', '.05', '.0', '0.', '-5.',...
primitive.replace('-', ''))
37
4
wemake-services/wemake-python-styleguide
train
153
fce0dcbc79b030bae58de9da09777be07e6c6803
train
tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_underscored_numbers.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_underscored_numbers.py
36
4
assert_*
test_underscored_number
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UnderscoredNumberViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) @pytest.mark.parametrize('primitive', [ '10_00', '333_555', '3_3.3', ...
[UnderscoredNumberViolation])
modified
fda52a8d34725265afb1075914c4040928ef5c98eb8c68088b836a23db789f67
assert_*|test_underscored_number|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UnderscoredNumberViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) @pytest.mark.parametrize('primitive', [ '10_00', '333_555', '3...
[UnderscoredNumberViolation])
36
4
wemake-services/wemake-python-styleguide
train
153
fce0dcbc79b030bae58de9da09777be07e6c6803
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
73
4
assert_*
test_implicit_string_concatenation
# -*- coding: utf-8 -*- 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...
[ImplicitStringConcatenationViolation])
added
cd1273fd331050bbcd6d8340d996dacf9aae9ea008d22a84331e1f5f0d501341
assert_*|test_implicit_string_concatenation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitStringConcatenationViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringConcatenationVisitor, ) # Correct: correct_string_sum = '...
null
null
null
wemake-services/wemake-python-styleguide
train
153
fce0dcbc79b030bae58de9da09777be07e6c6803
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
74
4
assert_*
test_uppercase_prefix
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @pytest.mark.parametrize('modifier', [ 'r', 'b', 'rb', 'f', ...
[UppercaseStringModifierViolation])
modified
3f599916b77350c6aa1ba65555fa7e11fb4d4ce673d4003890d5139cf6b2ee1a
assert_*|test_uppercase_prefix|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @pytest.mark.parametrize('modifier', [ 'r', 'b', 'rb', 'f'...
[UppercaseStringModifierViolation])
74
4
wemake-services/wemake-python-styleguide
train
153
fce0dcbc79b030bae58de9da09777be07e6c6803
train
tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_string_multiline.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_string_multiline.py
79
4
assert_*
test_incorrect_multiline_strings
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( IncorrectMultilineStringViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) multiline_single = """''' abc '''""" multiline_double = '''""" abc """''' #...
[IncorrectMultilineStringViolation])
modified
cd21fe42627da96f4490e47914e5d296ea49329c9528c3fbb5e9ffcf1cf2c119
assert_*|test_incorrect_multiline_strings|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( IncorrectMultilineStringViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) multiline_single = """''' abc '''""" multiline...
[IncorrectMultilineStringViolation])
79
4
wemake-services/wemake-python-styleguide
train
153
fce0dcbc79b030bae58de9da09777be07e6c6803
train
tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_unicode_prefix.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_unicode_prefix.py
36
4
assert_*
test_unicode_prefix
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UnicodeStringViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @pytest.mark.parametrize('primitive', [ 'u"te...
primitive)
modified
39b5a3b7e4e416f84fdc576b63c8cdeb65cd6e4635f4265b4a944c9a46978dfc
assert_*|test_unicode_prefix|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UnicodeStringViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @pytest.mark.parametrize('primitive'...
primitive)
35
4
wemake-services/wemake-python-styleguide
train
154
2ca1511ba33656c87789e220cb666088cb711046
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
77
4
assert_*
test_wrong_continue_in_loop
# -*- coding: utf-8 -*- 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: co...
[UselessContinueViolation])
added
f70e7af40c1ef49d09f3f2b77f70efea92b26eef05a6e603804133d9e319c0f1
assert_*|test_wrong_continue_in_loop|# -*- coding: utf-8 -*- 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 < ...
null
null
null
wemake-services/wemake-python-styleguide
train
155
7baec950cb613e7f5cbae956951c22fe05231ebb
train
tests/test_visitors/test_ast/test_statements/test_parameters_indentation/test_collection_indentation.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_parameters_indentation/test_collection_indentation.py
289
4
assert_*
test_wrong_collection_indentation
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.statements import ( ParametersIndentationViolation, WrongParametersIndentationVisitor, ) # Correct: correct_single_line_tuple = 'xy = (1, 2, 3)' correct_single_line_list = 'xy = [1, 2, 3]' correct_single_line_set = 'xy = {1, 2,...
[ParametersIndentationViolation])
added
77274247682bdf16ff5f7d26c39a868720197191c19e77601009a328eac5bed4
assert_*|test_wrong_collection_indentation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.statements import ( ParametersIndentationViolation, WrongParametersIndentationVisitor, ) # Correct: correct_single_line_tuple = 'xy = (1, 2, 3)' correct_single_line_list = 'xy = [1, 2, 3]' correct...
null
null
null
wemake-services/wemake-python-styleguide
train
156
8db54802487786616d33d9f6215af23353ee0026
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
193
4
assert_*
test_statement_with_no_effect
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( StatementHasNoEffectViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} """ # Simple conditions: if_template = ...
[StatementHasNoEffectViolation])
modified
b18031b1a52dfbe6462f21649f13f3d0949573a52c114ef5be691ee245e9524a
assert_*|test_statement_with_no_effect|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( StatementHasNoEffectViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} """ # Simple c...
[StatementHasNoEffectViolation])
194
4
wemake-services/wemake-python-styleguide
train
156
8db54802487786616d33d9f6215af23353ee0026
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
357
4
assert_*
test_statement_with_useless_docstring
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( StatementHasNoEffectViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} """ # Simple conditions: if_template = ...
[StatementHasNoEffectViolation])
modified
ac9eec95af2a511b49b4c439764b66a6959b951f2a9d666f3b57b1066ea44da7
assert_*|test_statement_with_useless_docstring|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( StatementHasNoEffectViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} """ # ...
[StatementHasNoEffectViolation])
357
4
wemake-services/wemake-python-styleguide
train
156
8db54802487786616d33d9f6215af23353ee0026
train
tests/test_visitors/test_ast/test_statements/test_useless_node.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_useless_node.py
66
4
assert_*
test_useless_nodes
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessNodeViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) for_template = """ def wrapper(): for some_var in call(): {0} """ while_templa...
[UselessNodeViolation])
added
db2cabacb514da1af3eebbfba7e57ad2cf1ebd53f0f3024287b055c6b9f526f5
assert_*|test_useless_nodes|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessNodeViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) for_template = """ def wrapper(): for some_var in call(): {0} """ while_te...
null
null
null
wemake-services/wemake-python-styleguide
train
156
8db54802487786616d33d9f6215af23353ee0026
train
tests/test_visitors/test_ast/test_statements/test_useless_node.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_useless_node.py
91
4
assert_*
test_useless_loop_nodes
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessNodeViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) for_template = """ def wrapper(): for some_var in call(): {0} """ while_templa...
[UselessNodeViolation])
added
33eb4dc4913d3f731c2c98da1104a62791acdb746829abbd4ed9349f8cb3cf9d
assert_*|test_useless_loop_nodes|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessNodeViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) for_template = """ def wrapper(): for some_var in call(): {0} """ whi...
null
null
null
wemake-services/wemake-python-styleguide
train
156
8db54802487786616d33d9f6215af23353ee0026
train
tests/test_visitors/test_ast/test_statements/test_useless_node.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_useless_node.py
114
4
assert_*
test_useless_try_nodes
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessNodeViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) for_template = """ def wrapper(): for some_var in call(): {0} """ while_templa...
[UselessNodeViolation])
added
8a6547d8470806b80730d32fd66bc33e26f602ecf873a53477efef60211912ec
assert_*|test_useless_try_nodes|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessNodeViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) for_template = """ def wrapper(): for some_var in call(): {0} """ whil...
null
null
null
wemake-services/wemake-python-styleguide
train
157
e4d26599462711f49799679cc140584cebc57532
train
tests/test_visitors/test_ast/test_keywords/test_try_except/test_base_exception.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_try_except/test_base_exception.py
49
4
assert_*
test_use_base_exception
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BaseExceptionViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongTryExceptVisitor, ) use_base_exception = """ try: ... except BaseException: ... """ use_except_exception ...
[BaseExceptionViolation])
added
5a8922defe3f9b7a8b307671d529ac71ed16abc460b9b91a4bc2c4da897d1de1
assert_*|test_use_base_exception|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BaseExceptionViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongTryExceptVisitor, ) use_base_exception = """ try: ... except BaseException: ... """ use_exce...
null
null
null
wemake-services/wemake-python-styleguide
train
157
e4d26599462711f49799679cc140584cebc57532
train
tests/test_visitors/test_ast/test_keywords/test_try_except/test_useless_except_case.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_try_except/test_useless_except_case.py
90
4
assert_*
test_useless_except_case
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessExceptCaseViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongTryExceptVisitor, ) right_empty_bare_except = """ try: ... except: ... """ right_logging_except = """ tr...
[UselessExceptCaseViolation])
added
554c9c08fd96360c07a502b7e1b4829539fb6366f97de83b3e7e9349f01ef9b9
assert_*|test_useless_except_case|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessExceptCaseViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongTryExceptVisitor, ) right_empty_bare_except = """ try: ... except: ... """ right_logging_e...
null
null
null
wemake-services/wemake-python-styleguide
train
157
e4d26599462711f49799679cc140584cebc57532
train
tests/test_visitors/test_ast/test_statements/test_useless_node.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_useless_node.py
115
4
assert_*
test_useless_try_nodes
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessNodeViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) for_template = """ def wrapper(): for some_var in call(): {0} """ while_templa...
[UselessNodeViolation])
modified
a01a2e44064b753c90411c90198d1a65398a506a667d94ee4910fa2ba37f19d2
assert_*|test_useless_try_nodes|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessNodeViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) for_template = """ def wrapper(): for some_var in call(): {0} """ whil...
[UselessNodeViolation])
114
4
wemake-services/wemake-python-styleguide
train
158
14243b696fda929e2923a8d9708b89392539a0b5
train
tests/test_checker/test_presets.py
train
wemake-services/wemake-python-styleguide:tests/test_checker/test_presets.py
70
8
assert
test_all_visitors_contained_in_checker
# -*- coding: utf-8 -*- import importlib import inspect from importlib.machinery import SourceFileLoader from operator import itemgetter from pathlib import Path import pytest from wemake_python_styleguide.checker import Checker from wemake_python_styleguide.visitors.base import ( BaseFilenameVisitor, BaseNo...
checker_visitors
modified
22b7cf44f213a5bcef047b6866073926d6839e2714223f38ebf8045f7daef046
assert|test_all_visitors_contained_in_checker|# -*- coding: utf-8 -*- import importlib import inspect from importlib.machinery import SourceFileLoader from operator import itemgetter from pathlib import Path import pytest from wemake_python_styleguide.checker import Checker from wemake_python_styleguide.visitors.base i...
checker_visitors
70
8
wemake-services/wemake-python-styleguide
train
158
14243b696fda929e2923a8d9708b89392539a0b5
train
tests/test_checker/test_presets.py
train
wemake-services/wemake-python-styleguide:tests/test_checker/test_presets.py
72
4
assert
test_all_visitors_contained_in_checker
# -*- coding: utf-8 -*- import importlib import inspect from importlib.machinery import SourceFileLoader from operator import itemgetter from pathlib import Path import pytest from wemake_python_styleguide.checker import Checker from wemake_python_styleguide.visitors.base import ( BaseFilenameVisitor, BaseNo...
len(checker_visitors)
modified
2d22043dd621d989252974fe1c4f45f0e8f11a073a5f064364d306fc71b46277
assert|test_all_visitors_contained_in_checker|# -*- coding: utf-8 -*- import importlib import inspect from importlib.machinery import SourceFileLoader from operator import itemgetter from pathlib import Path import pytest from wemake_python_styleguide.checker import Checker from wemake_python_styleguide.visitors.base i...
len(checker_visitors)
72
4
wemake-services/wemake-python-styleguide
train
159
4665b7731de6cb5a58bc46a5a9b10223b8163f4c
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
358
4
assert_*
test_statement_with_useless_docstring
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( StatementHasNoEffectViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} """ # Simple conditions: if_template = ...
[StatementHasNoEffectViolation])
modified
62ed7ae0e474bfc2d36755c1a8d2efb0e6aaf5c3a546964ed4e48bba5d8a71c5
assert_*|test_statement_with_useless_docstring|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( StatementHasNoEffectViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} """ # ...
[StatementHasNoEffectViolation])
357
4
wemake-services/wemake-python-styleguide
train
160
a9f6a0b1f43e96e0a034165ba71e0187d245a7e6
train
tests/test_visitors/test_ast/test_classes/test_base_classes/test_expression_base_class.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_base_classes/test_expression_base_class.py
38
4
assert_*
test_base_class_expression
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( IncorrectBaseClassViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassVisitor class_with_base = """ class Meta({0}): '''Docs.''' """ @pytest.mark.parametrize('code', [ cla...
[IncorrectBaseClassViolation])
modified
6dfb8bbb356ae99e8b31385436568a4a4b3b28402eef271a15ab1143fa25034f
assert_*|test_base_class_expression|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( IncorrectBaseClassViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassVisitor class_with_base = """ class Meta({0}): '''Docs.''' """ @pytest.mark.parame...
[IncorrectBaseClassViolation])
39
4
wemake-services/wemake-python-styleguide
train
162
15caf3ea0a1fd51af80f711d7de7c338d5c2263a
train
tests/test_visitors/test_ast/test_comparisons/test_order.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_comparisons/test_order.py
85
4
assert_*
test_comparison_wrong_order
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ComparisonOrderViolation, ) from wemake_python_styleguide.visitors.ast.comparisons import ( WrongComparisionOrderVisitor, ) @pytest.mark.parametrize('comparators', [ ('first_name', 'second_name'), ('f...
[ComparisonOrderViolation])
modified
25752edf31c643746e67a953f4891bf081f0aab8f639cb3d3fa78f205a677b4f
assert_*|test_comparison_wrong_order|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ComparisonOrderViolation, ) from wemake_python_styleguide.visitors.ast.comparisons import ( WrongComparisionOrderVisitor, ) @pytest.mark.parametrize('comparators', [ ('first_name', 's...
[ComparisonOrderViolation])
85
4
wemake-services/wemake-python-styleguide
train
162
15caf3ea0a1fd51af80f711d7de7c338d5c2263a
train
tests/test_visitors/test_ast/test_comparisons/test_order.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_comparisons/test_order.py
110
4
assert_*
test_comparison_wrong_order_multiple
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ComparisonOrderViolation, ) from wemake_python_styleguide.visitors.ast.comparisons import ( WrongComparisionOrderVisitor, ) @pytest.mark.parametrize('comparators', [ ('first_name', 'second_name'), ('f...
[ ComparisonOrderViolation, ComparisonOrderViolation, ])
modified
a1fb8520988f7a0113374d2837ce7e25e063a06cbdeb954e22bf906de9deda0e
assert_*|test_comparison_wrong_order_multiple|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ComparisonOrderViolation, ) from wemake_python_styleguide.visitors.ast.comparisons import ( WrongComparisionOrderVisitor, ) @pytest.mark.parametrize('comparators', [ ('first_...
[ ComparisonOrderViolation, ComparisonOrderViolation, ])
110
4
wemake-services/wemake-python-styleguide
train
163
00dd5ce3802fdf8b3cb22dbd387138c82875b5b8
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
46
4
assert_*
test_wrong_function_defaults
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( ComplexDefaultValuesViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) function_with_defaults = """ def __init__( self, tree, filename='(none...
[ComplexDefaultValuesViolation])
added
86f181d01b62ef706004c68c54fcf56eeaa9f74a03ab91b0447d075837606497
assert_*|test_wrong_function_defaults|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( ComplexDefaultValuesViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) function_with_defaults = """ def __init__( self, tree, ...
null
null
null
wemake-services/wemake-python-styleguide
train
164
6a6c742b549307be8ed602956791f63f2d4a536a
train
tests/fixtures/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py
185
0
assert
# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name...
hex_number
modified
ae67e0bd95a9a81d1b44f518cd68b4ba097aca6b7587336b67cda5b60466c17d
assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name = u...
hex_number
184
0
wemake-services/wemake-python-styleguide
train
164
6a6c742b549307be8ed602956791f63f2d4a536a
train
tests/test_visitors/test_ast/test_builtins/test_useless_operators_before_numbers.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_useless_operators_before_numbers.py
63
4
assert_*
test_plus_sign_before_numbers
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessOperatorsViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( UselessOperatorsVisitor, ) # Usages: assignment = 'constant = {0}' assignment_addition = 'constant = x + {0}' assignmen...
[UselessOperatorsViolation])
added
b71d2d7779defdf54ab3ccc2191e14c82d6ad735f7271601166e846f4cb4f8cf
assert_*|test_plus_sign_before_numbers|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessOperatorsViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( UselessOperatorsVisitor, ) # Usages: assignment = 'constant = {0}' assignment_addition = 'c...
null
null
null
wemake-services/wemake-python-styleguide
train
165
a5aac7922d27f739e92fac3fbfbece4c34f42d3a
train
tests/test_visitors/test_ast/test_builtins/test_useless_operators_before_numbers.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_useless_operators_before_numbers.py
68
4
assert_*
test_plus_sign_before_numbers
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessOperatorsViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( UselessOperatorsVisitor, ) # Usages: assignment = 'constant = {0}' assignment_addition = 'constant = x + {0}' assignmen...
[UselessOperatorsViolation])
added
e57576fd4ee71927d201a4d79c59a8736116a7566d95d42e1287b1b46219ee9a
assert_*|test_plus_sign_before_numbers|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessOperatorsViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( UselessOperatorsVisitor, ) # Usages: assignment = 'constant = {0}' assignment_addition = 'c...
null
null
null
wemake-services/wemake-python-styleguide
train
167
45f3355bb9ab6b7a5f49c7cb46c2cfe27b14f14c
train
tests/test_visitors/test_ast/test_keywords/test_del.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_del.py
49
4
assert_*
test_del_keyword
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongKeywordViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongKeywordVisitor del_variable = """ x = 5 del x """ del_key = """ temp_dict = {'a': 1} del temp_dict['a'] """ del_index =...
[WrongKeywordViolation])
added
f69b58f843f3dc8628f12e563cd47c96361b407bd6a97674a9710387fa7fdc91
assert_*|test_del_keyword|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongKeywordViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongKeywordVisitor del_variable = """ x = 5 del x """ del_key = """ temp_dict = {'a': 1} del temp_dict['a'...
null
null
null
wemake-services/wemake-python-styleguide
train
167
45f3355bb9ab6b7a5f49c7cb46c2cfe27b14f14c
train
tests/test_visitors/test_tokenize/test_comments/test_empty_line_after_coding.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_empty_line_after_coding.py
92
4
assert_*
test_incorrect_coding_comment
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( EmptyLineAfterCodingViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import ( FileMagicCommentsVisitor, ) # Correct: empty_module = '' empty_module_with_coding = """# -*- coding: utf-8 -*...
[EmptyLineAfterCodingViolation])
added
d87decdc179dda962d9fd2a3051a7db0bf8568f6654eb5b3f60987d728e876af
assert_*|test_incorrect_coding_comment|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( EmptyLineAfterCodingViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import ( FileMagicCommentsVisitor, ) # Correct: empty_module = '' empty_module_with_coding ...
null
null
null
wemake-services/wemake-python-styleguide
train
168
5591bafa19d9e8be8edc74c7f3320d8122deeca7
train
tests/test_visitors/test_ast/test_keywords/test_context_managers/test_context_managers_definitions.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_context_managers/test_context_managers_definitions.py
39
4
assert_*
test_context_manager_wrong_definitions
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( ContextManagerVariableDefinitionViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongContextManagerVisitor, ) context_manager_definition = """ def wrapper(): with open('') as {...
[ContextManagerVariableDefinitionViolation])
added
1ba0af33e2f6a7db59ba2f120f2bf0a586198bb35d837b93b17e5cd9f16825c7
assert_*|test_context_manager_wrong_definitions|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( ContextManagerVariableDefinitionViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongContextManagerVisitor, ) context_manager_definition = """ ...
null
null
null
wemake-services/wemake-python-styleguide
train
168
5591bafa19d9e8be8edc74c7f3320d8122deeca7
train
tests/test_visitors/test_ast/test_loops/test_comprehensions/test_variable_definition_comprehensions.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_comprehensions/test_variable_definition_comprehensions.py
53
4
assert_*
test_wrong_definitions_in_comprehension
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( LoopVariableDefinitionViolation, ) from wemake_python_styleguide.visitors.ast.loops import ( WrongLoopDefinitionVisitor, ) list_comprehension = """ def container(): nodes = [0 for {0} in some] """ gene...
[LoopVariableDefinitionViolation])
added
069adcf984a4af22bbaaa3f00206723cdf2dd63958bfaa7af9ff1574eec1e135
assert_*|test_wrong_definitions_in_comprehension|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( LoopVariableDefinitionViolation, ) from wemake_python_styleguide.visitors.ast.loops import ( WrongLoopDefinitionVisitor, ) list_comprehension = """ def container(): nod...
null
null
null
wemake-services/wemake-python-styleguide
train
168
5591bafa19d9e8be8edc74c7f3320d8122deeca7
train
tests/test_visitors/test_ast/test_loops/test_loops/test_variable_definitions_loops.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_loops/test_variable_definitions_loops.py
39
4
assert_*
test_wrong_definition_loop
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( LoopVariableDefinitionViolation, ) from wemake_python_styleguide.visitors.ast.loops import ( WrongLoopDefinitionVisitor, ) for_loop_def = """ def wrapper(): for {0} in some: ... """ @pytest.ma...
[LoopVariableDefinitionViolation])
added
085c6440a23e5847f845d9d4ab8832a295170f708ce0ae3404370844b0ae14f4
assert_*|test_wrong_definition_loop|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( LoopVariableDefinitionViolation, ) from wemake_python_styleguide.visitors.ast.loops import ( WrongLoopDefinitionVisitor, ) for_loop_def = """ def wrapper(): for {0} in some: ... """...
null
null
null
wemake-services/wemake-python-styleguide
train
169
3ca0468d0a7e7c807a986fc5b102429cba0df837
train
tests/fixtures/external_plugins.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/external_plugins.py
20
0
assert
from sys import * import sys from typing import List, Union, Dict int = 12 ++int extra_parens = list((node for node in 'abc')) some_tuple = (1, 2, ) breaking_pycodestyle=3 # commented: str = 'comment' def camelCase(): ... '{}'.format(1) "" '%s' % 'test' assert
True
modified
59d5a713b85aaf56de1b0dcb27077aa282ebfe002f8265a937283dc54ec7e7b5
assert||from sys import * import sys from typing import List, Union, Dict int = 12 ++int extra_parens = list((node for node in 'abc')) some_tuple = (1, 2, ) breaking_pycodestyle=3 # commented: str = 'comment' def camelCase(): ... '{}'.format(1) "" '%s' % 'test' assert
True
19
0
wemake-services/wemake-python-styleguide
train
169
3ca0468d0a7e7c807a986fc5b102429cba0df837
train
tests/test_visitors/test_ast/test_attributes/test_magic_attributes.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_attributes/test_magic_attributes.py
139
4
assert_*
test_magic_attribute_is_restricted
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.attributes import ( DirectMagicAttributeAccessViolation, WrongAttributeVisitor, ) # Incorrect: magic_attribute_assigned = 'some.__magic__ = 1' magic_attribute_accessed = 'print(some.__magic__)' magic_method_called = 'some.__mag...
[DirectMagicAttributeAccessViolation])
added
07da252ae818f367f1c0f6da527bffc7cdfc3f2e70959cb56c06fc79428ca989
assert_*|test_magic_attribute_is_restricted|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.attributes import ( DirectMagicAttributeAccessViolation, WrongAttributeVisitor, ) # Incorrect: magic_attribute_assigned = 'some.__magic__ = 1' magic_attribute_accessed = 'print(some.__magic__)' m...
null
null
null
wemake-services/wemake-python-styleguide
train
169
3ca0468d0a7e7c807a986fc5b102429cba0df837
train
tests/test_visitors/test_ast/test_attributes/test_magic_attributes.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_attributes/test_magic_attributes.py
140
4
assert_*
test_magic_attribute_is_restricted
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.attributes import ( DirectMagicAttributeAccessViolation, WrongAttributeVisitor, ) # Incorrect: magic_attribute_assigned = 'some.__magic__ = 1' magic_attribute_accessed = 'print(some.__magic__)' magic_method_called = 'some.__mag...
'__magic__')
added
9125a7a9ce8b299aa9293ea86b470c0c5e30c6939fba07e7de2027690126510e
assert_*|test_magic_attribute_is_restricted|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.attributes import ( DirectMagicAttributeAccessViolation, WrongAttributeVisitor, ) # Incorrect: magic_attribute_assigned = 'some.__magic__ = 1' magic_attribute_accessed = 'print(some.__magic__)' m...
null
null
null
wemake-services/wemake-python-styleguide
train
169
3ca0468d0a7e7c807a986fc5b102429cba0df837
train
tests/test_visitors/test_ast/test_attributes/test_protected_attributes.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_attributes/test_protected_attributes.py
136
4
assert_*
test_protected_attribute_is_restricted
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.attributes import ( ProtectedAttributeViolation, WrongAttributeVisitor, ) # Incorrect: protected_attribute_assigned = 'some._protected = 1' protected_attribute_accessed = 'print(some._protected)' protected_method_called = 'some...
[ProtectedAttributeViolation])
modified
4112e2fb5a8f0a20ec2ddfba3f176348e61fefb059041ba836f622c4a3f88405
assert_*|test_protected_attribute_is_restricted|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.attributes import ( ProtectedAttributeViolation, WrongAttributeVisitor, ) # Incorrect: protected_attribute_assigned = 'some._protected = 1' protected_attribute_accessed = 'print(some._protect...
[ProtectedAttributeViolation])
139
4
wemake-services/wemake-python-styleguide
train
169
3ca0468d0a7e7c807a986fc5b102429cba0df837
train
tests/test_visitors/test_ast/test_attributes/test_protected_attributes.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_attributes/test_protected_attributes.py
137
4
assert_*
test_protected_attribute_is_restricted
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.attributes import ( ProtectedAttributeViolation, WrongAttributeVisitor, ) # Incorrect: protected_attribute_assigned = 'some._protected = 1' protected_attribute_accessed = 'print(some._protected)' protected_method_called = 'some...
'_protected')
modified
edb75bb2962e01cd3582c107a444307a01b13f6c1f9676a6f3e95e9448da3397
assert_*|test_protected_attribute_is_restricted|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.attributes import ( ProtectedAttributeViolation, WrongAttributeVisitor, ) # Incorrect: protected_attribute_assigned = 'some._protected = 1' protected_attribute_accessed = 'print(some._protect...
'_protected')
140
4
wemake-services/wemake-python-styleguide
train
171
64c54b280b57c290ce1150b1dfeb7e4147573810
train
tests/test_visitors/test_ast/test_conditions/test_negated_conditions.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_negated_conditions.py
60
4
assert_*
test_wrong_negated_complex_conditions
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( NegatedConditionsViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor simple_conditions = """ if {0}: ... """ complex_conditions = """ if {0}: ... else: ... ...
[NegatedConditionsViolation])
added
088d510508413875aebf782edb54cbac1a3476d4ee167b36598628c1a632e83a
assert_*|test_wrong_negated_complex_conditions|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( NegatedConditionsViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor simple_conditions = """ if {0}: ... """ complex_conditions =...
null
null
null
wemake-services/wemake-python-styleguide
train
172
aa28d195c0761a75d73b1c3138b0def09f497555
train
tests/test_visitors/test_tokenize/test_comments/test_no_cover_comment.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_no_cover_comment.py
31
4
assert_*
test_no_cover_overuse
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( OveruseOfNoCoverCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import ( WrongCommentVisitor, ) @pytest.mark.parametrize('code', [ 'wallet = 10 # pragma: no cover', 'w...
[OveruseOfNoCoverCommentViolation])
added
88a814f23fa14fa5abbe99e534218e514c489ec2aeb5bc89ebb8d46b4fd2e8e9
assert_*|test_no_cover_overuse|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( OveruseOfNoCoverCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import ( WrongCommentVisitor, ) @pytest.mark.parametrize('code', [ 'wallet = 10 # pragma: no ...
null
null
null
wemake-services/wemake-python-styleguide
train
173
048ba369b774c6195393bf838c00398647d0eecb
train
tests/test_visitors/test_ast/test_conditions/test_negated_conditions.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_negated_conditions.py
64
4
assert_*
test_wrong_negated_complex_conditions
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( NegatedConditionsViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor simple_conditions = """ if {0}: ... """ complex_conditions = """ if {0}: ... else: ... ...
[NegatedConditionsViolation])
added
323d0da02bcb3db2eef37f3ebf0e257a61b473683dd96051670997ebe036c85f
assert_*|test_wrong_negated_complex_conditions|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( NegatedConditionsViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor simple_conditions = """ if {0}: ... """ complex_conditions =...
null
null
null
wemake-services/wemake-python-styleguide
train
174
98151170f002319cacac5005027c17b098d7a519
train
tests/test_visitors/test_ast/test_exceptions/test_base_exception.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_exceptions/test_base_exception.py
49
4
assert_*
test_use_base_exception
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BaseExceptionViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongTryExceptVisitor, ) use_base_exception = """ try: ... except BaseException: ... """ use_except_exceptio...
[BaseExceptionViolation])
modified
c36463f7fca0ef09c903602d09fcbf310d8586ef12d842c9c7d45524c3c49a79
assert_*|test_use_base_exception|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BaseExceptionViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongTryExceptVisitor, ) use_base_exception = """ try: ... except BaseException: ... """ use_ex...
[BaseExceptionViolation])
49
4
wemake-services/wemake-python-styleguide
train
174
98151170f002319cacac5005027c17b098d7a519
train
tests/test_visitors/test_ast/test_exceptions/test_duplicate_exceptions.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_exceptions/test_duplicate_exceptions.py
147
4
assert_*
test_duplicate_exceptions
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( DuplicateExceptionViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongTryExceptVisitor, ) # Correct: correct_bare_except = """ try: ... except: ... """ correct_simple_...
[DuplicateExceptionViolation])
modified
d03851acc2c115f19498461d9fb69ff5224f916cd1fe68eb5fe7d643e567f3a0
assert_*|test_duplicate_exceptions|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( DuplicateExceptionViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongTryExceptVisitor, ) # Correct: correct_bare_except = """ try: ... except: ... """ c...
[DuplicateExceptionViolation])
147
4
wemake-services/wemake-python-styleguide
train
174
98151170f002319cacac5005027c17b098d7a519
train
tests/test_visitors/test_ast/test_exceptions/test_finally_return_path.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_exceptions/test_finally_return_path.py
169
4
assert_*
test_wrong_return_in_else_or_finally
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( TryExceptMultipleReturnPathViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongTryExceptVisitor, ) # Correct: right_both_return = """ def function(): try: return 1 ...
[TryExceptMultipleReturnPathViolation])
modified
1b9de461b709f864187c7581fec49b5d7a4a75ffd4017bac0b8df1d68ab67b0f
assert_*|test_wrong_return_in_else_or_finally|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( TryExceptMultipleReturnPathViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongTryExceptVisitor, ) # Correct: right_both_return = """ def func...
[TryExceptMultipleReturnPathViolation])
169
4
wemake-services/wemake-python-styleguide
train
174
98151170f002319cacac5005027c17b098d7a519
train
tests/test_visitors/test_ast/test_exceptions/test_finally_return_path.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_exceptions/test_finally_return_path.py
183
4
assert_*
test_double_wrong_return_in_else_or_finally
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( TryExceptMultipleReturnPathViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongTryExceptVisitor, ) # Correct: right_both_return = """ def function(): try: return 1 ...
[ TryExceptMultipleReturnPathViolation, TryExceptMultipleReturnPathViolation, ])
modified
62061177efea3790655e7bc1500d81827300a3e7a2f05dc91191c0436831b661
assert_*|test_double_wrong_return_in_else_or_finally|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( TryExceptMultipleReturnPathViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongTryExceptVisitor, ) # Correct: right_both_return = """ d...
[ TryExceptMultipleReturnPathViolation, TryExceptMultipleReturnPathViolation, ])
183
4
wemake-services/wemake-python-styleguide
train
174
98151170f002319cacac5005027c17b098d7a519
train
tests/test_visitors/test_ast/test_exceptions/test_nested_try_blocks.py
val
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_exceptions/test_nested_try_blocks.py
105
4
assert_*
test_nested_try_blocks
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( NestedTryViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( NestedTryBlocksVisitor, ) # Correct: one_try_example = """ try: ... except SomeError: ... else: ... finally:...
[NestedTryViolation])
added
85a3e3e0ab62b8f2789fc3bb412fd88f6c5b2c4be4b5c336713c48451c437d09
assert_*|test_nested_try_blocks|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( NestedTryViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( NestedTryBlocksVisitor, ) # Correct: one_try_example = """ try: ... except SomeError: ... else: ... ...
null
null
null
wemake-services/wemake-python-styleguide
train
174
98151170f002319cacac5005027c17b098d7a519
train
tests/test_visitors/test_ast/test_exceptions/test_try_finally.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_exceptions/test_try_finally.py
62
4
assert_*
test_wrong_finally
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( RedundantFinallyViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongTryExceptVisitor, ) right_try_example = """ try: ... except: ... """ wrong_try_example = """ try: ...
[RedundantFinallyViolation])
modified
749f3c9ad6443d90a98e59522f122404f9449b53e444ae29a2b13f2fad48ed0a
assert_*|test_wrong_finally|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( RedundantFinallyViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongTryExceptVisitor, ) right_try_example = """ try: ... except: ... """ wrong_try_example = """...
[RedundantFinallyViolation])
62
4
wemake-services/wemake-python-styleguide
train
174
98151170f002319cacac5005027c17b098d7a519
train
tests/test_visitors/test_ast/test_exceptions/test_useless_except_case.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_exceptions/test_useless_except_case.py
90
4
assert_*
test_useless_except_case
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessExceptCaseViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongTryExceptVisitor, ) right_empty_bare_except = """ try: ... except: ... """ right_logging_except = """ ...
[UselessExceptCaseViolation])
modified
3b022da3e49bec5bb2f651e05c2d10c741d09ef6f443655a517a6911fa2990c2
assert_*|test_useless_except_case|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessExceptCaseViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongTryExceptVisitor, ) right_empty_bare_except = """ try: ... except: ... """ right_logging...
[UselessExceptCaseViolation])
90
4
wemake-services/wemake-python-styleguide
train
175
3fed658fca93748715b32c62ccdc2113466ac2d5
train
tests/test_visitors/test_ast/test_functions/test_super_call.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_super_call.py
100
4
assert_*
test_wrong_super_call
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( IncorrectSuperCallViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( WrongFunctionCallVisitor, ) # Correct: correct_super_call = """ class Example(object): def some_method(self,...
[IncorrectSuperCallViolation])
added
d2a20227c792395f3c1c9dfa451b3525af0714e38e7721e08e411bf3946290b3
assert_*|test_wrong_super_call|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( IncorrectSuperCallViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( WrongFunctionCallVisitor, ) # Correct: correct_super_call = """ class Example(object): def so...
null
null
null
wemake-services/wemake-python-styleguide
train
175
3fed658fca93748715b32c62ccdc2113466ac2d5
train
tests/test_visitors/test_ast/test_functions/test_super_call.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_super_call.py
120
4
assert_*
test_double_wrong_super_call
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( IncorrectSuperCallViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( WrongFunctionCallVisitor, ) # Correct: correct_super_call = """ class Example(object): def some_method(self,...
[ IncorrectSuperCallViolation, IncorrectSuperCallViolation, ])
added
3f9c40257f33e61894bb232a9ab2be5e6f6cc4b66d5ed77249bc92edcdd92220
assert_*|test_double_wrong_super_call|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( IncorrectSuperCallViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( WrongFunctionCallVisitor, ) # Correct: correct_super_call = """ class Example(object):...
null
null
null
wemake-services/wemake-python-styleguide
train
176
8459040d5cbba8ce3917af69aa4d7d1b65d1907b
train
tests/test_visitors/test_ast/test_conditions/test_multiline_conditions.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_conditions/test_multiline_conditions.py
83
4
assert_*
test_incorrect_multiline_conditions
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( MultilineConditionsViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor incorrect_conditions1 = """if some and ( other == 1 ): ... """ incorrect_conditions2 = ""...
[MultilineConditionsViolation])
added
84db6b4f559c40ff45c6852b80494ac8bed4ed6c86fc3a55f07f9156cc0a4cb3
assert_*|test_incorrect_multiline_conditions|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( MultilineConditionsViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor incorrect_conditions1 = """if some and ( other == 1 ): ... "...
null
null
null
wemake-services/wemake-python-styleguide
train
177
df14668227406cdb6cbcd226c7d478b1737d14cb
train
tests/test_visitors/test_ast/test_comparisons/test_order.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_comparisons/test_order.py
86
4
assert_*
test_comparison_wrong_order
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ComparisonOrderViolation, ) from wemake_python_styleguide.visitors.ast.comparisons import ( WrongComparisionOrderVisitor, ) @pytest.mark.parametrize('comparators', [ ('first_name', 'second_name'), ('f...
[ComparisonOrderViolation])
modified
8a2c4e4801f1fefc3b7e918cee4e46e8057462548b3a90775b021a22f8cef80e
assert_*|test_comparison_wrong_order|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ComparisonOrderViolation, ) from wemake_python_styleguide.visitors.ast.comparisons import ( WrongComparisionOrderVisitor, ) @pytest.mark.parametrize('comparators', [ ('first_name', 's...
[ComparisonOrderViolation])
85
4
wemake-services/wemake-python-styleguide
train
177
df14668227406cdb6cbcd226c7d478b1737d14cb
train
tests/test_visitors/test_ast/test_comparisons/test_order.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_comparisons/test_order.py
111
4
assert_*
test_comparison_wrong_order_multiple
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ComparisonOrderViolation, ) from wemake_python_styleguide.visitors.ast.comparisons import ( WrongComparisionOrderVisitor, ) @pytest.mark.parametrize('comparators', [ ('first_name', 'second_name'), ('f...
[ ComparisonOrderViolation, ComparisonOrderViolation, ])
modified
7745e8b51adf5bf2dbccfa96a377f6d49870ec027246b4bd49130d1f96d7f2b8
assert_*|test_comparison_wrong_order_multiple|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ComparisonOrderViolation, ) from wemake_python_styleguide.visitors.ast.comparisons import ( WrongComparisionOrderVisitor, ) @pytest.mark.parametrize('comparators', [ ('first_...
[ ComparisonOrderViolation, ComparisonOrderViolation, ])
110
4
wemake-services/wemake-python-styleguide
train
178
5d3847a23be106f6f3fe12719812634f6b8be272
train
tests/test_visitors/test_ast/test_functions/test_unused_variables.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_unused_variables.py
139
4
assert_*
test_wrong_super_call
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import ( UnusedVariableIsUsedViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) # Correct: correct_module = """ _PROTECTED = 1 PUBLIC = _PROTECTED + 1 """ correct_class...
[UnusedVariableIsUsedViolation])
added
57d0f965f7e715a0d54f1dcfa48d1c78452fa0a89d67e39d7598b5b739008d57
assert_*|test_wrong_super_call|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import ( UnusedVariableIsUsedViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) # Correct: correct_module = """ _PROTECTED = 1 PUBLIC = _PROTECTED + 1...
null
null
null
wemake-services/wemake-python-styleguide
train
178
5d3847a23be106f6f3fe12719812634f6b8be272
train
tests/test_visitors/test_ast/test_functions/test_unused_variables.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_unused_variables.py
159
4
assert_*
test_double_wrong_variables
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import ( UnusedVariableIsUsedViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) # Correct: correct_module = """ _PROTECTED = 1 PUBLIC = _PROTECTED + 1 """ correct_class...
[ UnusedVariableIsUsedViolation, UnusedVariableIsUsedViolation, ])
added
0a00dde15910142358c4e3a2d000fd4295b99c9da255f7f7accf722dfd86fd3e
assert_*|test_double_wrong_variables|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import ( UnusedVariableIsUsedViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) # Correct: correct_module = """ _PROTECTED = 1 PUBLIC = _PROTECT...
null
null
null
wemake-services/wemake-python-styleguide
train
179
176ffa63b137e3bc1ded831513b8fddf1890676a
train
tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return_variables.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return_variables.py
113
4
assert_*
test_wrong_return_variable
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnVariableViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVariableVisitor, ) # Correct: correct_example1 = """ def some_function(): return 1 ""...
[InconsistentReturnVariableViolation])
added
888fcf9a5dd6a3bd071d53e6ee9a16b94ddd1c943820fbd9a9373130678a62d3
assert_*|test_wrong_return_variable|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnVariableViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVariableVisitor, ) # Correct: correct_example1 = """ def some_fun...
null
null
null
wemake-services/wemake-python-styleguide
train
179
176ffa63b137e3bc1ded831513b8fddf1890676a
train
tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return_variables.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return_variables.py
152
4
assert_*
test_double_wrong_return_variable
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnVariableViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVariableVisitor, ) # Correct: correct_example1 = """ def some_function(): return 1 ""...
[ InconsistentReturnVariableViolation, InconsistentReturnVariableViolation, ])
added
9a458fb73d8b824a394c4fcde159d8fda37827c3b707cc2e2a0d2c0795e188cd
assert_*|test_double_wrong_return_variable|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnVariableViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVariableVisitor, ) # Correct: correct_example1 = """ def s...
null
null
null
wemake-services/wemake-python-styleguide
train
181
8a6e770c7b1879fe45beb334afd12b5311dcd413
train
tests/fixtures/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py
180
0
assert
# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name...
octal_number
added
0d28ff2f3a6ad66d3b9c2e0c9954e53e637f8d62cc48483913a4fd3542763f2b
assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name = u...
null
null
null
wemake-services/wemake-python-styleguide
train
181
8a6e770c7b1879fe45beb334afd12b5311dcd413
train
tests/fixtures/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py
191
0
assert
# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name...
hex_number
added
6f6a493fc8a8ceadc9659ef770a3b3531155948e0483aa84bcb74ce462fe60ad
assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name = u...
null
null
null
wemake-services/wemake-python-styleguide
train
181
8a6e770c7b1879fe45beb334afd12b5311dcd413
train
tests/test_visitors/test_ast/test_modules/test_magic_module_functions.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_modules/test_magic_module_functions.py
32
4
assert_*
test_wrong_magic_used
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.constants import MAGIC_MODULE_NAMES_BLACKLIST from wemake_python_styleguide.violations.best_practices import ( BadMagicModuleFunctionViolation, ) from wemake_python_styleguide.visitors.ast.modules import ( MagicModuleFunctionsVisitor, ) regu...
[BadMagicModuleFunctionViolation])
added
35918f43f801f7d11bc78d5a0edd4b2dd260a2f55e4c7cbc2cb907d0404169f3
assert_*|test_wrong_magic_used|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.constants import MAGIC_MODULE_NAMES_BLACKLIST from wemake_python_styleguide.violations.best_practices import ( BadMagicModuleFunctionViolation, ) from wemake_python_styleguide.visitors.ast.modules import ( MagicModuleFunc...
null
null
null
wemake-services/wemake-python-styleguide
train
182
89413514322530bc1a7448f931dc94080e166ae5
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
52
4
assert_*
test_wrong_function_defaults
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( ComplexDefaultValuesViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) function_with_ellipse_default = """ def __init__(self, inner_value: None = ...) ->...
[ComplexDefaultValuesViolation])
added
318f1110bb959c7ac9047b724b0eedeb0a68508c2721d32b74b2780d684e380a
assert_*|test_wrong_function_defaults|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( ComplexDefaultValuesViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) function_with_ellipse_default = """ def __init__(self, ...
null
null
null
wemake-services/wemake-python-styleguide
train
183
cf33aa35684b07e8c73970bb25689dee04214f77
train
tests/test_visitors/test_ast/test_comparisons/test_order.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_comparisons/test_order.py
91
4
assert_*
test_comparison_wrong_order
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ComparisonOrderViolation, ) from wemake_python_styleguide.visitors.ast.comparisons import ( WrongComparisionOrderVisitor, ) regression577 = """ async def function(): assert await _coroutine(1) == Success(1...
[ComparisonOrderViolation])
added
ce9a2eb4f7858ab2564bf7232e040defd35fb79909397e244eb29c98a00591dd
assert_*|test_comparison_wrong_order|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ComparisonOrderViolation, ) from wemake_python_styleguide.visitors.ast.comparisons import ( WrongComparisionOrderVisitor, ) regression577 = """ async def function(): assert await _cor...
null
null
null
wemake-services/wemake-python-styleguide
train
183
cf33aa35684b07e8c73970bb25689dee04214f77
train
tests/test_visitors/test_ast/test_comparisons/test_order.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_comparisons/test_order.py
116
4
assert_*
test_comparison_wrong_order_multiple
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ComparisonOrderViolation, ) from wemake_python_styleguide.visitors.ast.comparisons import ( WrongComparisionOrderVisitor, ) regression577 = """ async def function(): assert await _coroutine(1) == Success(1...
[ ComparisonOrderViolation, ComparisonOrderViolation, ])
added
46c858082fb4055d36eda419c71ef077138962e082d45fa95a35fb863eac0976
assert_*|test_comparison_wrong_order_multiple|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ComparisonOrderViolation, ) from wemake_python_styleguide.visitors.ast.comparisons import ( WrongComparisionOrderVisitor, ) regression577 = """ async def function(): assert a...
null
null
null
wemake-services/wemake-python-styleguide
train
183
cf33aa35684b07e8c73970bb25689dee04214f77
train
tests/test_visitors/test_filenames/test_module/test_module_name_length.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_filenames/test_module/test_module_name_length.py
25
4
assert_*
test_too_short_filename
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import ( TooLongNameViolation, TooShortNameViolation, ) from wemake_python_styleguide.visitors.filenames.module import ( WrongModuleNameVisitor, ) @pytest.mark.parametrize('filename', [ 'a.py', 'some/package/z....
[TooShortNameViolation])
modified
228a6b1ac2e8faae52fb358da1b1da40c6ecdffb49f83b30344a30277e951c20
assert_*|test_too_short_filename|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import ( TooLongNameViolation, TooShortNameViolation, ) from wemake_python_styleguide.visitors.filenames.module import ( WrongModuleNameVisitor, ) @pytest.mark.parametrize('filename', [ 'a.py', 'some/p...
[ TooShortNameViolation, WrongModuleNamePatternViolation, ])
26
4
wemake-services/wemake-python-styleguide
train
183
cf33aa35684b07e8c73970bb25689dee04214f77
train
tests/test_visitors/test_filenames/test_module/test_module_name_length.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_filenames/test_module/test_module_name_length.py
50
4
assert_*
test_length_option
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import ( TooLongNameViolation, TooShortNameViolation, ) from wemake_python_styleguide.visitors.filenames.module import ( WrongModuleNameVisitor, ) @pytest.mark.parametrize('filename', [ 'a.py', 'some/package/z....
filename.replace('.py', ''))
added
0c3fd15c8454a2d3087624d796bc44b50f453a9d95bbbf4039bd2432f413f939
assert_*|test_length_option|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import ( TooLongNameViolation, TooShortNameViolation, ) from wemake_python_styleguide.visitors.filenames.module import ( WrongModuleNameVisitor, ) @pytest.mark.parametrize('filename', [ 'a.py', 'some/packag...
null
null
null
wemake-services/wemake-python-styleguide
train
183
cf33aa35684b07e8c73970bb25689dee04214f77
train
tests/test_visitors/test_filenames/test_module/test_module_name_length.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_filenames/test_module/test_module_name_length.py
64
4
assert_*
test_too_long_filename
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import ( TooLongNameViolation, TooShortNameViolation, ) from wemake_python_styleguide.visitors.filenames.module import ( WrongModuleNameVisitor, ) @pytest.mark.parametrize('filename', [ 'a.py', 'some/package/z....
[TooLongNameViolation])
added
5577062846363e4a488b011cb5e4fd1af091f05ebd8959bf132a13c7c904af07
assert_*|test_too_long_filename|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import ( TooLongNameViolation, TooShortNameViolation, ) from wemake_python_styleguide.visitors.filenames.module import ( WrongModuleNameVisitor, ) @pytest.mark.parametrize('filename', [ 'a.py', 'some/pa...
null
null
null
wemake-services/wemake-python-styleguide
train
183
cf33aa35684b07e8c73970bb25689dee04214f77
train
tests/test_visitors/test_filenames/test_module/test_module_name_length.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_filenames/test_module/test_module_name_length.py
76
4
assert_*
test_max_length_option
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import ( TooLongNameViolation, TooShortNameViolation, ) from wemake_python_styleguide.visitors.filenames.module import ( WrongModuleNameVisitor, ) @pytest.mark.parametrize('filename', [ 'a.py', 'some/package/z....
filename.replace('.py', ''))
added
8cead9c3cc05ea08ff322171932d6e595487f879b205686542ca1fcedbf3a022
assert_*|test_max_length_option|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import ( TooLongNameViolation, TooShortNameViolation, ) from wemake_python_styleguide.visitors.filenames.module import ( WrongModuleNameVisitor, ) @pytest.mark.parametrize('filename', [ 'a.py', 'some/pa...
null
null
null
wemake-services/wemake-python-styleguide
train
184
c012c72159af4bfb517a45d2cab992f214b9e253
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
38
4
assert_*
test_wrong_function_defaults
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( ComplexDefaultValuesViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) function_with_defaults = """ def function(self, with_default={0}): ... """ @...
[ComplexDefaultValuesViolation])
added
ea6b2cee341c9e05b2f2ef0aa75273335230a556cfa6881db7be9254f1147b33
assert_*|test_wrong_function_defaults|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( ComplexDefaultValuesViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) function_with_defaults = """ def function(self, with_de...
null
null
null
wemake-services/wemake-python-styleguide
train
184
c012c72159af4bfb517a45d2cab992f214b9e253
train
tests/test_visitors/test_ast/test_loops/test_comprehensions/test_yield_inside_comprehension.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_comprehensions/test_yield_inside_comprehension.py
48
4
assert_*
test_yield_keyword_in_comprehension
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( YieldInComprehensionViolation, ) from wemake_python_styleguide.visitors.ast.loops import ( WrongComprehensionVisitor, ) list_comprehension = """ def container(): nodes = [{0} for xy in "abc"] """ gener...
[YieldInComprehensionViolation])
modified
16832ad310bc49a920f2bae6bab464e4ba6c8152622eb269994a3d0c17e03a7a
assert_*|test_yield_keyword_in_comprehension|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( YieldInComprehensionViolation, ) from wemake_python_styleguide.visitors.ast.loops import ( WrongComprehensionVisitor, ) list_comprehension = """ def container(): nodes = [{...
[YieldInComprehensionViolation])
46
4
wemake-services/wemake-python-styleguide
train
185
0d5491b983cf141148d2cc47be191b31feb6ceb7
train
tests/fixtures/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py
178
0
assert
# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name...
octal_number
modified
4425e19da271275457f6f0c02758e191b3764007920d616658c210cd1f7f8f29
assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name = u...
octal_number
180
0
wemake-services/wemake-python-styleguide
train
185
0d5491b983cf141148d2cc47be191b31feb6ceb7
train
tests/fixtures/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py
189
0
assert
# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name...
hex_number
modified
b447bb8f648b93f07dbae11db96682a968d2bcea9316a64cc6c34155eaaa12d4
assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name = u...
hex_number
191
0
wemake-services/wemake-python-styleguide
train
185
0d5491b983cf141148d2cc47be191b31feb6ceb7
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
21
8
assert
# -*- coding: utf-8 -*- import re import subprocess from collections import Counter ERROR_PATTERN = re.compile(r'(Z\d{3})') IGNORED_VIOLATIONS = ( 'Z202', # since our test case is complex, that's fine 'Z402', # since we obviously use a lot of `noqa` comments ) def _assert_errors_count_in_output(output, er...
errors
modified
b1c606f35342b08ca1ef475fceba552735dbbb33e6b1d3375902cdb7659ce581
assert||# -*- coding: utf-8 -*- import re import subprocess from collections import Counter ERROR_PATTERN = re.compile(r'(Z\d{3})') IGNORED_VIOLATIONS = ( 'Z202', # since our test case is complex, that's fine 'Z402', # since we obviously use a lot of `noqa` comments ) def _assert_errors_count_in_output(output, errors, ...
errors
21
8
wemake-services/wemake-python-styleguide
train
185
0d5491b983cf141148d2cc47be191b31feb6ceb7
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
24
8
assert
# -*- coding: utf-8 -*- import re import subprocess from collections import Counter ERROR_PATTERN = re.compile(r'(Z\d{3})') IGNORED_VIOLATIONS = ( 'Z202', # since our test case is complex, that's fine 'Z402', # since we obviously use a lot of `noqa` comments ) def _assert_errors_count_in_output(output, er...
errors
modified
693491dff102219c034e0106d5199ef68a1ba60a9932757fc95f05f9cbae15e8
assert||# -*- coding: utf-8 -*- import re import subprocess from collections import Counter ERROR_PATTERN = re.compile(r'(Z\d{3})') IGNORED_VIOLATIONS = ( 'Z202', # since our test case is complex, that's fine 'Z402', # since we obviously use a lot of `noqa` comments ) def _assert_errors_count_in_output(output, errors, ...
errors
24
8
wemake-services/wemake-python-styleguide
train
185
0d5491b983cf141148d2cc47be191b31feb6ceb7
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
25
8
assert
# -*- coding: utf-8 -*- import re import subprocess from collections import Counter ERROR_PATTERN = re.compile(r'(Z\d{3})') IGNORED_VIOLATIONS = ( 'Z202', # since our test case is complex, that's fine 'Z402', # since we obviously use a lot of `noqa` comments ) def _assert_errors_count_in_output(output, er...
errors.pop(found_error)
modified
482054f47272cdc21d1425d7176ba7019b231e77c57fe36f1af419aaa66c06d1
assert||# -*- coding: utf-8 -*- import re import subprocess from collections import Counter ERROR_PATTERN = re.compile(r'(Z\d{3})') IGNORED_VIOLATIONS = ( 'Z202', # since our test case is complex, that's fine 'Z402', # since we obviously use a lot of `noqa` comments ) def _assert_errors_count_in_output(output, errors, ...
errors.pop(found_error)
25
8
wemake-services/wemake-python-styleguide
train
185
0d5491b983cf141148d2cc47be191b31feb6ceb7
train
tests/test_visitors/test_ast/test_builtins/test_useless_operators_before_numbers.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_useless_operators_before_numbers.py
68
4
assert_*
test_plus_sign_before_numbers
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessOperatorsViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( UselessOperatorsVisitor, ) # Usages: assignment = 'constant = {0}' assignment_addition = 'constant = x + {0}' assignmen...
[UselessOperatorsViolation])
modified
b8ae2aa80b5596f05519518c23b46dbdd6544b2e1f3650fa5e6a82262fa7ad76
assert_*|test_plus_sign_before_numbers|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessOperatorsViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( UselessOperatorsVisitor, ) # Usages: assignment = 'constant = {0}' assignment_addition = 'c...
[UselessOperatorsViolation])
68
4
wemake-services/wemake-python-styleguide
train
185
0d5491b983cf141148d2cc47be191b31feb6ceb7
train
tests/test_visitors/test_ast/test_modules/test_mutable_constants.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_modules/test_mutable_constants.py
34
4
assert_*
test_wrong_constant_type_used
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( MutableModuleConstantViolation, ) from wemake_python_styleguide.visitors.ast.modules import ( ModuleConstantsVisitor, ) module_constant = 'CONST = {0}' @pytest.mark.parametrize('code', [ '{1, 2, 3}', ...
[MutableModuleConstantViolation])
added
6eabdcebbbc670e4a64d3e06c19c17d70d96f678e7e482c72d24190e27e7636b
assert_*|test_wrong_constant_type_used|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( MutableModuleConstantViolation, ) from wemake_python_styleguide.visitors.ast.modules import ( ModuleConstantsVisitor, ) module_constant = 'CONST = {0}' @pytest.mark.parametrize('...
null
null
null
wemake-services/wemake-python-styleguide
train
186
1b891bd70226e845ef768edafcf9432b2d04860c
train
tests/test_visitors/test_ast/test_modules/test_mutable_constants.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_modules/test_mutable_constants.py
42
4
assert_*
test_wrong_constant_type_used
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( MutableModuleConstantViolation, ) from wemake_python_styleguide.visitors.ast.modules import ( ModuleConstantsVisitor, ) module_constant = 'CONST = {0}' module_variable = 'some_variable = {0}' module_attrib...
[MutableModuleConstantViolation])
added
78264a2ea6ca66fa36c1798cb8f0e21722d15a1627a6e3803b958848602bd85f
assert_*|test_wrong_constant_type_used|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( MutableModuleConstantViolation, ) from wemake_python_styleguide.visitors.ast.modules import ( ModuleConstantsVisitor, ) module_constant = 'CONST = {0}' module_variable = 'some_va...
null
null
null
wemake-services/wemake-python-styleguide
train
187
c6c62ab3679a7ad512642472a353ee8a7cc44d9f
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
22
8
assert
# -*- coding: utf-8 -*- import re import subprocess from collections import Counter ERROR_PATTERN = re.compile(r'(Z\d{3})') IGNORED_VIOLATIONS = ( 'Z202', # since our test case is complex, that's fine 'Z226', # we have a lot of ugly strings inside, 'Z402', # since we obviously use a lot of `noqa` comme...
errors
modified
bf6300c0b964be52101452dfb55ceeebb1103856cb65d60d2efb43b6b8b96969
assert||# -*- coding: utf-8 -*- import re import subprocess from collections import Counter ERROR_PATTERN = re.compile(r'(Z\d{3})') IGNORED_VIOLATIONS = ( 'Z202', # since our test case is complex, that's fine 'Z226', # we have a lot of ugly strings inside, 'Z402', # since we obviously use a lot of `noqa` comments ) def...
errors
21
8
wemake-services/wemake-python-styleguide
train
187
c6c62ab3679a7ad512642472a353ee8a7cc44d9f
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
25
8
assert
# -*- coding: utf-8 -*- import re import subprocess from collections import Counter ERROR_PATTERN = re.compile(r'(Z\d{3})') IGNORED_VIOLATIONS = ( 'Z202', # since our test case is complex, that's fine 'Z226', # we have a lot of ugly strings inside, 'Z402', # since we obviously use a lot of `noqa` comme...
errors
modified
dc919a07c4f787125f041c147541f4baad5cf0da396982208fdabc924d440fb0
assert||# -*- coding: utf-8 -*- import re import subprocess from collections import Counter ERROR_PATTERN = re.compile(r'(Z\d{3})') IGNORED_VIOLATIONS = ( 'Z202', # since our test case is complex, that's fine 'Z226', # we have a lot of ugly strings inside, 'Z402', # since we obviously use a lot of `noqa` comments ) def...
errors
24
8
wemake-services/wemake-python-styleguide
train
187
c6c62ab3679a7ad512642472a353ee8a7cc44d9f
train
tests/test_checker/test_noqa.py
test
wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py
26
8
assert
# -*- coding: utf-8 -*- import re import subprocess from collections import Counter ERROR_PATTERN = re.compile(r'(Z\d{3})') IGNORED_VIOLATIONS = ( 'Z202', # since our test case is complex, that's fine 'Z226', # we have a lot of ugly strings inside, 'Z402', # since we obviously use a lot of `noqa` comme...
errors.pop(found_error)
modified
65483f9caef1c231dfa2fc552b7329e55e2e38650feaacf4adf6500167efada6
assert||# -*- coding: utf-8 -*- import re import subprocess from collections import Counter ERROR_PATTERN = re.compile(r'(Z\d{3})') IGNORED_VIOLATIONS = ( 'Z202', # since our test case is complex, that's fine 'Z226', # we have a lot of ugly strings inside, 'Z402', # since we obviously use a lot of `noqa` comments ) def...
errors.pop(found_error)
25
8
wemake-services/wemake-python-styleguide
train
187
c6c62ab3679a7ad512642472a353ee8a7cc44d9f
train
tests/test_visitors/test_ast/test_builtins/test_strings/test_overused_string.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_overused_string.py
45
4
assert_*
test_string_overuse
# -*- coding: utf-8 -*- from wemake_python_styleguide.violations.complexity import ( OverusedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import WrongStringVisitor string_actions = """ first = {0} second({0}) third[{0}] 'new' + {0} """ string_value = '"same-string"' def test_string_ov...
[OverusedStringViolation])
added
7ee5f1ef46f6b7f0d7e20cbf4434fd7ada02a5d3bc843b316dad1795285ffb0f
assert_*|test_string_overuse|# -*- coding: utf-8 -*- from wemake_python_styleguide.violations.complexity import ( OverusedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import WrongStringVisitor string_actions = """ first = {0} second({0}) third[{0}] 'new' + {0} """ string_value = '"same-string"...
null
null
null
wemake-services/wemake-python-styleguide
train
187
c6c62ab3679a7ad512642472a353ee8a7cc44d9f
train
tests/test_visitors/test_ast/test_builtins/test_strings/test_overused_string.py
test
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_overused_string.py
46
4
assert_*
test_string_overuse
# -*- coding: utf-8 -*- from wemake_python_styleguide.violations.complexity import ( OverusedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import WrongStringVisitor string_actions = """ first = {0} second({0}) third[{0}] 'new' + {0} """ string_value = '"same-string"' def test_string_ov...
string_value.replace('"', ''))
added
3c56a673d917ece1a51ddf0b07fd41b36ff6755ee94896dd8a75b84a7656a972
assert_*|test_string_overuse|# -*- coding: utf-8 -*- from wemake_python_styleguide.violations.complexity import ( OverusedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import WrongStringVisitor string_actions = """ first = {0} second({0}) third[{0}] 'new' + {0} """ string_value = '"same-string"...
null
null
null
wemake-services/wemake-python-styleguide
train
188
5fdeec1f9e34422e0eb8bdf9091fed60749eb433
train
tests/test_checker/test_invalid_options.py
train
wemake-services/wemake-python-styleguide:tests/test_checker/test_invalid_options.py
26
4
assert
test_invalid_options
# -*- coding: utf-8 -*- import subprocess def test_invalid_options(absolute_path): """End-to-End test to check option validation works.""" process = subprocess.Popen( [ 'flake8', '--isolated', '--select', 'Z', '--max-imports', '-...
stderr
added
a0473be4aeb41a772d312329c9db456937db4b0f9863fa10e5b67d103bdb174c
assert|test_invalid_options|# -*- coding: utf-8 -*- import subprocess def test_invalid_options(absolute_path): """End-to-End test to check option validation works.""" process = subprocess.Popen( [ 'flake8', '--isolated', '--select', 'Z', '--max-imports', '-5', # should be positive absolute_path('fixtures', 'noqa.py'), ...
null
null
null
wemake-services/wemake-python-styleguide
train
188
5fdeec1f9e34422e0eb8bdf9091fed60749eb433
train
tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return_variables.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return_variables.py
123
4
assert_*
test_wrong_return_variable
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnVariableViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVariableVisitor, ) # Correct: correct_example1 = """ def some_function(): return 1 ""...
[InconsistentReturnVariableViolation])
added
4385c2a57f38b40616f0639268957d857e868b22b8c71b3c6e985c957fca1b44
assert_*|test_wrong_return_variable|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnVariableViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVariableVisitor, ) # Correct: correct_example1 = """ def some_fun...
null
null
null
wemake-services/wemake-python-styleguide
train
188
5fdeec1f9e34422e0eb8bdf9091fed60749eb433
train
tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return_variables.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return_variables.py
162
4
assert_*
test_double_wrong_return_variable
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnVariableViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVariableVisitor, ) # Correct: correct_example1 = """ def some_function(): return 1 ""...
[ InconsistentReturnVariableViolation, InconsistentReturnVariableViolation, ])
added
ae07e0584a10ddf9cd30392eb167a8e5e3afe174fa0c4757bf9285b66cf88c62
assert_*|test_double_wrong_return_variable|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnVariableViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVariableVisitor, ) # Correct: correct_example1 = """ def s...
null
null
null
wemake-services/wemake-python-styleguide
train
189
466e0c76cd1d236a29dfde314bec9f932a41c31c
train
tests/test_visitors/test_ast/test_comparisons/test_multiple_in.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_comparisons/test_multiple_in.py
71
4
assert_*
test_comparison_with_multiple_in
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MultipleInComparisonViolation, ) from wemake_python_styleguide.visitors.ast.comparisons import ( ComparisonSanityVisitor, ) if_with_multiple_in_comparisons = 'if {0} in {1} in {2}: ...' if_without_multiple_in_...
[MultipleInComparisonViolation])
modified
d3f225770a96fce6940699779f1391a6493933ff503fbfa06f81d4257fe4de04
assert_*|test_comparison_with_multiple_in|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MultipleInComparisonViolation, ) from wemake_python_styleguide.visitors.ast.comparisons import ( ComparisonSanityVisitor, ) if_with_multiple_in_comparisons = 'if {0} in {1} in {2...
[MultipleInComparisonViolation])
71
4
wemake-services/wemake-python-styleguide
train
190
231c4b7c86fb6613e9a44797e9e28e029b063792
train
tests/fixtures/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py
185
0
assert
# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name...
octal_number
added
a775322636580cf8eceff67fa7e98f85a4dd31b9988ec4b84cc9a6e54131cb59
assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name = u...
null
null
null
wemake-services/wemake-python-styleguide
train
190
231c4b7c86fb6613e9a44797e9e28e029b063792
train
tests/fixtures/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py
196
0
assert
# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name...
hex_number
added
5dafa9396dab9f33246812a4b1ec94d7bd7295077cd693c0f6e0ad6c4884897e
assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name = u...
null
null
null
wemake-services/wemake-python-styleguide
train
190
231c4b7c86fb6613e9a44797e9e28e029b063792
train
tests/test_visitors/test_ast/test_complexity/test_counts/test_yield_length.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_yield_length.py
66
4
assert_*
test_yield_length_violation
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.counts import ( TooLongYieldTupleViolation, YieldTupleVisitor, ) generator = """ def function_name(): i = 0 while True: yield {0} i = i + 1 """ single = 'i + 1' tuple_empty = '()' tuple_fixed_...
[TooLongYieldTupleViolation])
added
3ad4ff6c9d08dc2a1ece52e360720e9e04ecbf33d8bf6f49d19df41463ad4b74
assert_*|test_yield_length_violation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.counts import ( TooLongYieldTupleViolation, YieldTupleVisitor, ) generator = """ def function_name(): i = 0 while True: yield {0} i = i + 1 """ single = 'i + 1' tuple_empty = '()' tuple_fixed...
null
null
null
wemake-services/wemake-python-styleguide
train
191
52b8127c8bc51374cf8e558666c37762d80d756e
train
tests/fixtures/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py
195
0
assert
# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name...
octal_number
modified
49c3a3fbb42bedc43da09b3e281d51e297cc89404eb2dd923b9df970629979b2
assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name = u...
hex_number
196
0
wemake-services/wemake-python-styleguide
train
191
52b8127c8bc51374cf8e558666c37762d80d756e
train
tests/fixtures/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py
206
0
assert
# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name...
hex_number
added
1470bf9c679793fc286955c0035c0c3a0b945f7ecb1d908a96a9be9657127c11
assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name = u...
null
null
null
wemake-services/wemake-python-styleguide
train
191
52b8127c8bc51374cf8e558666c37762d80d756e
train
tests/test_visitors/test_ast/test_complexity/test_function/test_awaits_count.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_function/test_awaits_count.py
67
4
assert_*
test_awaits_wrong_count
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.function import ( FunctionComplexityVisitor, TooManyAwaitsViolation, ) function_without_awaits = 'def function(): ...' function_async_without_awaits = 'async def function(): ...' function_with_awaits = """ async def ...
[TooManyAwaitsViolation])
added
78949946c2462b6b13f7bf1888f59e8f1a386c33937c618fca477358b8b787e4
assert_*|test_awaits_wrong_count|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.function import ( FunctionComplexityVisitor, TooManyAwaitsViolation, ) function_without_awaits = 'def function(): ...' function_async_without_awaits = 'async def function(): ...' function_with_aw...
null
null
null
wemake-services/wemake-python-styleguide
train
192
9bcde956370eccfe849a364267ea63218b6c772d
train
tests/fixtures/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py
195
0
assert
# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name...
octal_number
modified
54c13a9db0f346ed16a6c1e9635c90e539c05ddd4da225828d400ca97f2a936c
assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name = u...
octal_number
195
0
wemake-services/wemake-python-styleguide
train
192
9bcde956370eccfe849a364267ea63218b6c772d
train
tests/fixtures/noqa.py
train
wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py
206
0
assert
# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name...
hex_number
modified
6efb091fb8759727d98761e095fb8f51277db1ea7a17c84357441e079fe11db3
assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 from .version import get_version # noqa: Z300 full_name = u...
hex_number
206
0
wemake-services/wemake-python-styleguide
train
192
9bcde956370eccfe849a364267ea63218b6c772d
train
tests/test_visitors/test_ast/test_classes/test_base_classes/test_base_builtin_classes.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_base_classes/test_base_builtin_classes.py
36
4
assert_*
test_builtin_subclass
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BuiltinSubclassViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassVisitor class_with_base = """ class TestClass({0}): '''Docs.''' """ @pytest.mark.parametrize('super_class', ...
[BuiltinSubclassViolation])
added
f66e86dcdf1851de5740efc7b60ea75e31b8e87a5c0f02d160eb320ed0522567
assert_*|test_builtin_subclass|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BuiltinSubclassViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassVisitor class_with_base = """ class TestClass({0}): '''Docs.''' """ @pytest.mark.parametri...
null
null
null
wemake-services/wemake-python-styleguide
train
192
9bcde956370eccfe849a364267ea63218b6c772d
train
tests/test_visitors/test_ast/test_classes/test_base_classes/test_expression_base_class.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_base_classes/test_expression_base_class.py
34
4
assert_*
test_base_class_expression
# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( IncorrectBaseClassViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassVisitor class_with_base = """ class Meta({0}): '''Docs.''' """ @pytest.mark.parametrize('base', [ '(l...
[IncorrectBaseClassViolation])
added
e2a63cbc243941e8baa3c2a2227ba188bfe26aa188d2c903fc07dfb49ae75772
assert_*|test_base_class_expression|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( IncorrectBaseClassViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassVisitor class_with_base = """ class Meta({0}): '''Docs.''' """ @pytest.mark.parame...
null
null
null
wemake-services/wemake-python-styleguide
train
193
a147bda345bb6983bd59fed022efe475a3bfff85
train
tests/test_visitors/test_ast/test_builtins/test_magic_numbers.py
train
wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_magic_numbers.py
202
4
assert_*
test_magic_number_octal_warning
# -*- coding: utf-8 -*- import pytest 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 MagicNumberVisitor # Correct usages: assignment = 'cons...
[MagicNumberViolation])
modified
468eebde36270afd1d6c5d9dede0355a0212345fd1718fdcb34e623a0a7ef838
assert_*|test_magic_number_octal_warning|# -*- coding: utf-8 -*- import pytest 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 MagicNumberVisitor # C...
[MagicNumberViolation])
203
4