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 | 220 | b6b63dfe2bf63538ff575229956cda539e4713d2 | train | tests/test_violations/test_implementation.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_implementation.py | 16 | 4 | assert | test_visitor_returns_location | # -*- coding: utf-8 -*-
import ast
from wemake_python_styleguide.violations.base import (
ASTViolation,
BaseViolation,
)
def test_visitor_returns_location():
"""Ensures that `BaseNodeVisitor` return correct violation message."""
visitor = ASTViolation(node=ast.parse(''), text='violation')
visito... | (0, 0, 'WPS001 violation') | modified | 8d4844d0e0455d557eb8bc7f046dd5b2881f2921acb6713290f0028dd39d8284 | assert|test_visitor_returns_location|# -*- coding: utf-8 -*- import ast from wemake_python_styleguide.violations.base import ( ASTViolation, BaseViolation, ) def test_visitor_returns_location(): """Ensures that `BaseNodeVisitor` return correct violation message.""" visitor = ASTViolation(node=ast.parse(''), text='viola... | (0, 0, 'Z001 violation') | 16 | 4 |
wemake-services/wemake-python-styleguide | train | 220 | b6b63dfe2bf63538ff575229956cda539e4713d2 | train | tests/test_visitors/test_ast/test_complexity/test_jones/test_line_complexity.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_jones/test_line_complexity.py | 144 | 4 | assert | test_exact_complexity | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.complexity.jones import (
JonesComplexityVisitor,
LineComplexityViolation,
)
line_simple = 'x = 2'
line_with_types = 'x: int = 2'
line_with_comprehension = 'x = [f for f in "abc"]'
line_with_math = 'x = y * 2 + 19 / 9.3'
line_in... | complexity | modified | 25f8c66323a44ec3e94bae0ee49b2a99853d6dcb864e9af30ab7e103504d0847 | assert|test_exact_complexity|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.jones import ( JonesComplexityVisitor, LineComplexityViolation, ) line_simple = 'x = 2' line_with_types = 'x: int = 2' line_with_comprehension = 'x = [f for f in "abc"]' line_with_math = 'x = y * 2 +... | complexity | 144 | 4 |
wemake-services/wemake-python-styleguide | train | 220 | b6b63dfe2bf63538ff575229956cda539e4713d2 | train | tests/test_visitors/test_tokenize/test_comments/test_noqa_comment.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_noqa_comment.py | 63 | 4 | assert_* | test_incorrect_noqa_comment | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
WrongMagicCommentViolation,
)
from wemake_python_styleguide.visitors.tokenize.comments import (
WrongCommentVisitor,
)
@pytest.mark.parametrize('code', [
'x = 10_00 # noqa: WPS002,WPS114',
'x = 10... | [WrongMagicCommentViolation]) | modified | b0dde5afe8aa4c2ae8a1c7863dce0eea1e29f8f45e356a9e6042433f3a760bb7 | assert_*|test_incorrect_noqa_comment|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongMagicCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import ( WrongCommentVisitor, ) @pytest.mark.parametrize('code', [ 'x = 10_00 # noqa: WPS002,... | [WrongMagicCommentViolation]) | 63 | 4 |
wemake-services/wemake-python-styleguide | train | 220 | b6b63dfe2bf63538ff575229956cda539e4713d2 | train | tests/test_visitors/test_tokenize/test_comments/test_noqa_count.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_noqa_count.py | 33 | 4 | assert_* | test_noqa_overuse | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
OveruseOfNoqaCommentViolation,
)
from wemake_python_styleguide.visitors.tokenize.comments import (
WrongCommentVisitor,
)
@pytest.mark.parametrize('code', [
'wallet = 10 # noqa: WPS002,WPS114',
'w... | [OveruseOfNoqaCommentViolation]) | modified | 9c0339e1614eb26d466bea8486d4fe35dcb11b26065eb49c7c61d6d130e49f4a | assert_*|test_noqa_overuse|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( OveruseOfNoqaCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import ( WrongCommentVisitor, ) @pytest.mark.parametrize('code', [ 'wallet = 10 # noqa: WPS002,WPS11... | [OveruseOfNoqaCommentViolation]) | 33 | 4 |
wemake-services/wemake-python-styleguide | train | 221 | c5695c4586f7fab1e5d0b0e9c3dec72338cdc6ce | 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 | 34 | 4 | assert_* | test_builtin_subclass | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.oop import BuiltinSubclassViolation
from wemake_python_styleguide.visitors.ast.classes import WrongClassVisitor
class_with_base = """
class TestClass({0}):
'''Docs.'''
"""
@pytest.mark.parametrize('super_class', [
'int',
'st... | [BuiltinSubclassViolation]) | modified | 33cf2187d60dc42bf027f53d8e509689d7970a3e5a9d1298dab90a4bef7b5944 | assert_*|test_builtin_subclass|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.oop import BuiltinSubclassViolation from wemake_python_styleguide.visitors.ast.classes import WrongClassVisitor class_with_base = """ class TestClass({0}): '''Docs.''' """ @pytest.mark.parametrize('super_class'... | [BuiltinSubclassViolation]) | 36 | 4 |
wemake-services/wemake-python-styleguide | train | 221 | c5695c4586f7fab1e5d0b0e9c3dec72338cdc6ce | train | tests/test_visitors/test_ast/test_classes/test_methods/test_magic_methods.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_methods/test_magic_methods.py | 32 | 4 | assert_* | test_wrong_magic_used | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.constants import MAGIC_METHODS_BLACKLIST
from wemake_python_styleguide.violations.oop import BadMagicMethodViolation
from wemake_python_styleguide.visitors.ast.classes import WrongMethodVisitor
magic_method = """
class Example(object):
def {0}(s... | [BadMagicMethodViolation]) | modified | 111e949981400f0daf3cde6379b60cbd3b28486160a7ccc0a666c42d86ac7f57 | assert_*|test_wrong_magic_used|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.constants import MAGIC_METHODS_BLACKLIST from wemake_python_styleguide.violations.oop import BadMagicMethodViolation from wemake_python_styleguide.visitors.ast.classes import WrongMethodVisitor magic_method = """ class Ex... | [BadMagicMethodViolation]) | 34 | 4 |
wemake-services/wemake-python-styleguide | train | 221 | c5695c4586f7fab1e5d0b0e9c3dec72338cdc6ce | train | tests/test_visitors/test_ast/test_compares/test_nested_ternary.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_nested_ternary.py | 143 | 4 | assert_* | test_nested_ternary | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.refactoring import (
NestedTernaryViolation,
)
from wemake_python_styleguide.visitors.ast.compares import (
WrongConditionalVisitor,
)
wrong_compare1 = 'x > (a if b else c)'
wrong_compare2 = '(a if b else c) > x'
wrong_compare3 = ... | [NestedTernaryViolation]) | modified | 7c75e8817d1fbc3ca0d5f0d59a24a9e8aabd1214ed7ab1c7a7677ced58a0e0e8 | assert_*|test_nested_ternary|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( NestedTernaryViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConditionalVisitor, ) wrong_compare1 = 'x > (a if b else c)' wrong_compare2 = '(a if b else c) > x'... | [NestedTernaryViolation]) | 143 | 4 |
wemake-services/wemake-python-styleguide | train | 221 | c5695c4586f7fab1e5d0b0e9c3dec72338cdc6ce | train | tests/test_visitors/test_ast/test_complexity/test_jones/test_line_complexity.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_jones/test_line_complexity.py | 166 | 4 | assert | test_that_some_nodes_are_ignored | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.complexity.jones import (
JonesComplexityVisitor,
LineComplexityViolation,
)
line_simple = 'x = 2'
line_with_types = 'x: int = 2'
line_with_comprehension = 'x = [f for f in "abc"]'
line_with_math = 'x = y * 2 + 19 / 9.3'
line_in... | number_of_lines | modified | 6e5a2fe9803ac0b1bd6c06e2438e4666749244997ba981a40a63b87cfa094840 | assert|test_that_some_nodes_are_ignored|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.jones import ( JonesComplexityVisitor, LineComplexityViolation, ) line_simple = 'x = 2' line_with_types = 'x: int = 2' line_with_comprehension = 'x = [f for f in "abc"]' line_with_math = '... | number_of_lines | 166 | 4 |
wemake-services/wemake-python-styleguide | train | 221 | c5695c4586f7fab1e5d0b0e9c3dec72338cdc6ce | 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.refactoring import (
NegatedConditionsViolation,
)
from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor
simple_conditions = """
if {0}:
...
"""
complex_conditions = """
if {0}:
...
else:
...
"""... | [NegatedConditionsViolation]) | modified | 6746366fd360247c59266f3ff3584b5182ccb97c6c3866e3dd0ecca11b42a418 | assert_*|test_wrong_negated_complex_conditions|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( NegatedConditionsViolation, ) from wemake_python_styleguide.visitors.ast.conditions import IfStatementVisitor simple_conditions = """ if {0}: ... """ complex_conditions = ""... | [NegatedConditionsViolation]) | 64 | 4 |
wemake-services/wemake-python-styleguide | train | 221 | c5695c4586f7fab1e5d0b0e9c3dec72338cdc6ce | 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 | 103 | 4 | assert_* | test_nested_try_blocks | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.refactoring import NestedTryViolation
from wemake_python_styleguide.visitors.ast.exceptions import (
NestedTryBlocksVisitor,
)
# Correct:
one_try_example = """
try:
...
except SomeError:
...
else:
...
finally:
...
"""... | [NestedTryViolation]) | modified | 886ba238a03bc6dd880d078cb8a38cf84453ea8c29cedcb3f1bb16c7ed6d3f01 | assert_*|test_nested_try_blocks|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import NestedTryViolation from wemake_python_styleguide.visitors.ast.exceptions import ( NestedTryBlocksVisitor, ) # Correct: one_try_example = """ try: ... except SomeError: ... else: ... finally:... | [NestedTryViolation]) | 105 | 4 |
wemake-services/wemake-python-styleguide | train | 221 | c5695c4586f7fab1e5d0b0e9c3dec72338cdc6ce | 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 | 98 | 4 | assert_* | test_wrong_super_call | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.oop import WrongSuperCallViolation
from wemake_python_styleguide.visitors.ast.functions import (
WrongFunctionCallVisitor,
)
# Correct:
correct_super_call = """
class Example(object):
def some_method(self, arg1):
super().... | [WrongSuperCallViolation]) | modified | 15b47f0ca93a953c1cc5556f141f9610e648679301845c4c4c27a1bec3353b00 | assert_*|test_wrong_super_call|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.oop import WrongSuperCallViolation from wemake_python_styleguide.visitors.ast.functions import ( WrongFunctionCallVisitor, ) # Correct: correct_super_call = """ class Example(object): def some_method(self, arg1... | [WrongSuperCallViolation]) | 100 | 4 |
wemake-services/wemake-python-styleguide | train | 221 | c5695c4586f7fab1e5d0b0e9c3dec72338cdc6ce | train | tests/test_visitors/test_ast/test_loops/test_loops/test_iter_type.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_loops/test_iter_type.py | 42 | 4 | assert_* | test_iter_incorrect_type | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
WrongLoopIterTypeViolation,
)
from wemake_python_styleguide.visitors.ast.loops import (
WrongLoopDefinitionVisitor,
)
for_loop_template = """
def function():
for index in {0}:
...
"""
@pytest.mar... | [WrongLoopIterTypeViolation]) | modified | 2733a464934f367482836ee62b02632dbcb1606beb5f7be33234d70f78f7ab7f | assert_*|test_iter_incorrect_type|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( WrongLoopIterTypeViolation, ) from wemake_python_styleguide.visitors.ast.loops import ( WrongLoopDefinitionVisitor, ) for_loop_template = """ def function(): for index in {0}: ... """ @p... | [IncorectLoopIterTypeViolation]) | 42 | 4 |
wemake-services/wemake-python-styleguide | train | 222 | 7d94f3f14fcb30f0fc13ebcd0c22df4699c7eb2f | 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 | 60 | 4 | assert_* | test_string_overuse | # -*- coding: utf-8 -*-
import pytest
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}
"""
@pytest.mark.parametrize('strings',... | [OverusedStringViolation]) | added | 22949518e4fea56d1a0e67fd6bb43893c8753c9fd9d7e7dbd92b64b438e41a58 | assert_*|test_string_overuse|# -*- coding: utf-8 -*- import pytest 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} """ @pytest.mark.pa... | null | null | null |
wemake-services/wemake-python-styleguide | train | 222 | 7d94f3f14fcb30f0fc13ebcd0c22df4699c7eb2f | 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 | 61 | 4 | assert_* | test_string_overuse | # -*- coding: utf-8 -*-
import pytest
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}
"""
@pytest.mark.parametrize('strings',... | string_value.replace('"', '')) | added | 783cac9491357b7ad484a6e240b7b4d25ca865337c352dd9adc6517285298618 | assert_*|test_string_overuse|# -*- coding: utf-8 -*- import pytest 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} """ @pytest.mark.pa... | null | null | null |
wemake-services/wemake-python-styleguide | train | 223 | b96221331b0047efd595f9e2a205ffd6f1f22b69 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 197 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | len(all_violations) | added | 67fc26c4a14b27bf82f5dcd683d3f99e988674897f3deea60f3bd21b69562b60 | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 224 | ef98f0a309d205f61b698499dcb331e4974f53d8 | 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 | 105 | 4 | assert_* | test_string_overuse | # -*- coding: utf-8 -*-
import pytest
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_function_type_annotations = "... | [OverusedStringViolation]) | added | 31d9f289716e3f6dc1696e50ad161f13574e8cc394b5d33f169a2fb3f0c56e4b | assert_*|test_string_overuse|# -*- coding: utf-8 -*- import pytest 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_function... | null | null | null |
wemake-services/wemake-python-styleguide | train | 224 | ef98f0a309d205f61b698499dcb331e4974f53d8 | 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 | 106 | 4 | assert_* | test_string_overuse | # -*- coding: utf-8 -*-
import pytest
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_function_type_annotations = "... | string_value.replace('"', '') or "''") | added | 7b1cbeec01e22d44716200f691d91bca832016c7ff39bf2b2e7f828ae5a5a5d2 | assert_*|test_string_overuse|# -*- coding: utf-8 -*- import pytest 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_function... | null | null | null |
wemake-services/wemake-python-styleguide | train | 225 | 0a1c826d8da0bf4c7ecbd2d84141e3a17e1766df | 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 | 137 | 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 | 066c8d5b5f6106e2815c4b6181da39926ac1f325210651cb9e8b8aa099e1db58 | 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 | 225 | 0a1c826d8da0bf4c7ecbd2d84141e3a17e1766df | 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 | 176 | 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 | 71837ba5e55a59d426876192765d8f350729697783f1a563ad5b955a2df6524c | 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 | 226 | 909aa852121cb4f78fe42f3fdb47cf5c8c73e0b9 | train | tests/test_formatter/test_formatter_output.py | train | wemake-services/wemake-python-styleguide:tests/test_formatter/test_formatter_output.py | 77 | 4 | assert_* | test_formatter | # -*- coding: utf-8 -*-
"""
We use direct string assertiong on the formatter.
So, no unit tests for formatter, only e2e ones.
We use ``snapshottest`` to render and assert equality of the output:
https://github.com/syrusakbary/snapshottest
To update snapshots use ``--snapshot-update`` flag, when running ``pytest``.
... | 'formatter_{0}'.format(output)) | added | 7b99f99d6fad9e9561fbadfeac0365efa7a8858266ba91412b4dbe8dd00e4eb4 | assert_*|test_formatter|# -*- coding: utf-8 -*- """ We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` flag, when ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 226 | 909aa852121cb4f78fe42f3fdb47cf5c8c73e0b9 | train | tests/test_formatter/test_formatter_output.py | train | wemake-services/wemake-python-styleguide:tests/test_formatter/test_formatter_output.py | 111 | 4 | assert_* | test_formatter_correct | # -*- coding: utf-8 -*-
"""
We use direct string assertiong on the formatter.
So, no unit tests for formatter, only e2e ones.
We use ``snapshottest`` to render and assert equality of the output:
https://github.com/syrusakbary/snapshottest
To update snapshots use ``--snapshot-update`` flag, when running ``pytest``.
... | 'formatter_correct_{0}'.format(output)) | added | a5bdbf7bfc31dd244fe5cdd0e349e7e44ecb9bbdd013cf34716398d9030cbcf6 | assert_*|test_formatter_correct|# -*- coding: utf-8 -*- """ We use direct string assertiong on the formatter. So, no unit tests for formatter, only e2e ones. We use ``snapshottest`` to render and assert equality of the output: https://github.com/syrusakbary/snapshottest To update snapshots use ``--snapshot-update`` fla... | null | null | null |
wemake-services/wemake-python-styleguide | train | 227 | 1832468aca8eaf7321ca9f38200f0238c927ae9b | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 167 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | b5a8576481318f349c206f3e8169f2024f5da39dc5d398dff86ec259b4e5a53c | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 165 | 8 | |
wemake-services/wemake-python-styleguide | train | 227 | 1832468aca8eaf7321ca9f38200f0238c927ae9b | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 170 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | ac2a670c100dfd4bd982491d4815ba543716ade5879f2d609460c85df19fdb91 | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 168 | 8 | |
wemake-services/wemake-python-styleguide | train | 227 | 1832468aca8eaf7321ca9f38200f0238c927ae9b | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 171 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors.get(found_error) | modified | a1cee427397dce7aca646214ffd4f85e44f9b52a2d2605f2344122055e1e06fc | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors.get(found_error) | 169 | 8 | |
wemake-services/wemake-python-styleguide | train | 227 | 1832468aca8eaf7321ca9f38200f0238c927ae9b | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 199 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | len(all_violations) | modified | b94f9c598af742cc7952af450cc1505f343ba3679594fb6b662682dd8a4dbf30 | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since ... | len(all_violations) | 197 | 4 |
wemake-services/wemake-python-styleguide | train | 227 | 1832468aca8eaf7321ca9f38200f0238c927ae9b | train | tests/test_visitors/test_ast/test_complexity/test_counts/test_imports_counts.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_imports_counts.py | 63 | 4 | assert_* | test_module_import_counts_violation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.complexity import (
TooManyImportedNamesViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.counts import (
ImportMembersVisitor,
TooManyImportsViolation,
)
module_import = ''
module_with_regular_imports = """
i... | [TooManyImportsViolation]) | modified | 459e3a817865e4c9fc883cead52ae62bba08aa7794bba607a49f4e5479fc327b | assert_*|test_module_import_counts_violation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooManyImportedNamesViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( ImportMembersVisitor, TooManyImportsViolation, ) module_import = '' modul... | [TooManyImportsViolation]) | 60 | 4 |
wemake-services/wemake-python-styleguide | train | 227 | 1832468aca8eaf7321ca9f38200f0238c927ae9b | train | tests/test_visitors/test_ast/test_complexity/test_counts/test_imports_counts.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_imports_counts.py | 85 | 4 | assert_* | test_module_imported_names_counts_violation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.complexity import (
TooManyImportedNamesViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.counts import (
ImportMembersVisitor,
TooManyImportsViolation,
)
module_import = ''
module_with_regular_imports = """
i... | [TooManyImportedNamesViolation]) | added | eba85931f1c901d4baf57ab0e6b344498de4f95d192ae508e6dc280584e95561 | assert_*|test_module_imported_names_counts_violation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooManyImportedNamesViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( ImportMembersVisitor, TooManyImportsViolation, ) module_import = ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 228 | 3d4c5c43cfffadb745f4ce9b0c0e6af09c0e094a | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 168 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | 89359c7238ce7459cae96813b80813f4c1a70892ae7e3172e54a74688dbf3e83 | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 167 | 8 | |
wemake-services/wemake-python-styleguide | train | 228 | 3d4c5c43cfffadb745f4ce9b0c0e6af09c0e094a | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 171 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | 153073de943d51327394d388753c391675fc41d09bf28b28110258d32a30313d | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 170 | 8 | |
wemake-services/wemake-python-styleguide | train | 228 | 3d4c5c43cfffadb745f4ce9b0c0e6af09c0e094a | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 172 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors.get(found_error) | modified | 92e29a4243cef8d7d364ca37f1c98d52642cebbf8046bdb08a3b1d71b61b68cd | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors.get(found_error) | 171 | 8 | |
wemake-services/wemake-python-styleguide | train | 228 | 3d4c5c43cfffadb745f4ce9b0c0e6af09c0e094a | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 200 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | len(all_violations) | modified | d824959db4289a23f33ae404a04bed4ae7dd67cdd3c16ee39345438e74dceed3 | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since ... | len(all_violations) | 199 | 4 |
wemake-services/wemake-python-styleguide | train | 228 | 3d4c5c43cfffadb745f4ce9b0c0e6af09c0e094a | train | tests/test_visitors/test_ast/test_functions/test_stop_iteration.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_stop_iteration.py | 54 | 4 | assert_* | test_stop_iteration_inside_generators | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
StopIterationInsideGeneratorViolation,
)
from wemake_python_styleguide.visitors.ast.functions import (
FunctionDefinitionVisitor,
)
stop_iteration_method = """
class CheckStopIteration():
def check_stop... | [StopIterationInsideGeneratorViolation]) | added | b648a2dd5cf5c5e34d51e915092b99784507293febe4fcd008d838590798cd75 | assert_*|test_stop_iteration_inside_generators|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( StopIterationInsideGeneratorViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) stop_iteration_method = """ class Chec... | null | null | null |
wemake-services/wemake-python-styleguide | train | 228 | 3d4c5c43cfffadb745f4ce9b0c0e6af09c0e094a | train | tests/test_visitors/test_ast/test_functions/test_stop_iteration.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_stop_iteration.py | 83 | 4 | assert_* | test_stop_iteration_in_generators_yield_from | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
StopIterationInsideGeneratorViolation,
)
from wemake_python_styleguide.visitors.ast.functions import (
FunctionDefinitionVisitor,
)
stop_iteration_method = """
class CheckStopIteration():
def check_stop... | [StopIterationInsideGeneratorViolation]) | added | 628577b0889342c5a161a3e894ebc225a4c270267d60b261e7453d712d87dacd | assert_*|test_stop_iteration_in_generators_yield_from|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( StopIterationInsideGeneratorViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) stop_iteration_method = """ cla... | null | null | null |
wemake-services/wemake-python-styleguide | train | 229 | a8eea7e1243cef5bc88ee7e6e4c66f71175656d2 | train | tests/test_visitors/test_ast/test_modules/test_empty_init.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_modules/test_empty_init.py | 80 | 4 | assert_* | test_init_with_logic | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
InitModuleHasLogicViolation,
)
from wemake_python_styleguide.visitors.ast.modules import (
EmptyModuleContentsVisitor,
)
empty_module = ''
module_with_docstring = """
'''Hi, am a docstring inside a module.'... | [InitModuleHasLogicViolation]) | modified | b40b97ffa38c0d34af6708a0214845da2ff0ffc7551971b20d5d3e7fd3a96d28 | assert_*|test_init_with_logic|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( InitModuleHasLogicViolation, ) from wemake_python_styleguide.visitors.ast.modules import ( EmptyModuleContentsVisitor, ) empty_module = '' module_with_docstring = """ '''Hi, am a docstrin... | [InitModuleHasLogicViolation]) | 80 | 4 |
wemake-services/wemake-python-styleguide | train | 230 | c4043b5ba304a5781e8cfb81f4fb1272c00f2915 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 169 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | eaa61aadd1c573eaff15b813cbdad98326c7d6cce2811403f1db291d74b752af | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 168 | 8 | |
wemake-services/wemake-python-styleguide | train | 230 | c4043b5ba304a5781e8cfb81f4fb1272c00f2915 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 172 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | a557783b1f5215c651ef10c244f4c479bb9e7c6d2c7b99f02acadd57e951f966 | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 171 | 8 | |
wemake-services/wemake-python-styleguide | train | 230 | c4043b5ba304a5781e8cfb81f4fb1272c00f2915 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 173 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors.get(found_error) | modified | cfbcad653bf890b78ef793821c9d93708bf77b5acccc4b9e6864130804fd6902 | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors.get(found_error) | 172 | 8 | |
wemake-services/wemake-python-styleguide | train | 230 | c4043b5ba304a5781e8cfb81f4fb1272c00f2915 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 201 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | len(all_violations) | modified | 6ae1d0f777d68cbe8327f260a041a48882ef4e6a38639745c5828d4b2340b61b | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since ... | len(all_violations) | 200 | 4 |
wemake-services/wemake-python-styleguide | train | 230 | c4043b5ba304a5781e8cfb81f4fb1272c00f2915 | train | tests/test_visitors/test_ast/test_classes/test_method_order.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_method_order.py | 113 | 4 | assert_* | test_incorrect_method_order | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
WrongMethodOrderViolation,
)
from wemake_python_styleguide.visitors.ast.classes import (
ClassMethodOrderVisitor,
)
correct_method_order = """
class Test(object):
def __new__(self):
...
def __... | [WrongMethodOrderViolation]) | added | e30633dfba9e20c34d3b35469f0f2c12aa5b5b1ca43cafd681ce95f907a9276a | assert_*|test_incorrect_method_order|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( WrongMethodOrderViolation, ) from wemake_python_styleguide.visitors.ast.classes import ( ClassMethodOrderVisitor, ) correct_method_order = """ class Test(object): def __new__(self): .... | null | null | null |
wemake-services/wemake-python-styleguide | train | 231 | 113bfea2ad524ae4e1282dc818d55697e8814108 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 201 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from some import _protected # noqa: WPS436
from .version import get_version # noqa: WPS300
... | octal_number | modified | cade55a65a573df89d76bf40f4da00d24ff895ec0cf14fe58b96678e8d9be6cc | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ful... | octal_number | 198 | 0 | |
wemake-services/wemake-python-styleguide | train | 231 | 113bfea2ad524ae4e1282dc818d55697e8814108 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 212 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from some import _protected # noqa: WPS436
from .version import get_version # noqa: WPS300
... | hex_number | modified | b47949ec774fe34aafd6d67468307b5c66625d6ffb0800c3bb7038be2c70d51b | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ful... | hex_number | 209 | 0 | |
wemake-services/wemake-python-styleguide | train | 231 | 113bfea2ad524ae4e1282dc818d55697e8814108 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 173 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | a477ee40ffbe18fa64c4df51a71a8a7ee162e2136b6ef56b67634c6232543a9b | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 172 | 8 | |
wemake-services/wemake-python-styleguide | train | 231 | 113bfea2ad524ae4e1282dc818d55697e8814108 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 174 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors.get(found_error) | modified | 6131aa993798855f8f3e4cc48da643561ae2a5fff284275818fe65574dbd8876 | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors.get(found_error) | 173 | 8 | |
wemake-services/wemake-python-styleguide | train | 231 | 113bfea2ad524ae4e1282dc818d55697e8814108 | train | tests/test_visitors/test_ast/test_classes/test_methods/test_async_magic_methods.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_methods/test_async_magic_methods.py | 41 | 4 | assert_* | test_wrong_async_magic_used | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.constants import ASYNC_MAGIC_METHODS_WHITELIST
from wemake_python_styleguide.violations.oop import AsyncMagicMethodViolation
from wemake_python_styleguide.visitors.ast.classes import WrongMethodVisitor
sync_method = """
class Example(object):
de... | [AsyncMagicMethodViolation]) | added | d9e8cc215888b657dff79052c03c2e828fc172ebe46a8618cd9a1e1bccad4e0d | assert_*|test_wrong_async_magic_used|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.constants import ASYNC_MAGIC_METHODS_WHITELIST from wemake_python_styleguide.violations.oop import AsyncMagicMethodViolation from wemake_python_styleguide.visitors.ast.classes import WrongMethodVisitor sync_method =... | null | null | null |
wemake-services/wemake-python-styleguide | train | 231 | 113bfea2ad524ae4e1282dc818d55697e8814108 | train | tests/test_visitors/test_ast/test_classes/test_methods/test_async_magic_methods.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_methods/test_async_magic_methods.py | 42 | 4 | assert_* | test_wrong_async_magic_used | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.constants import ASYNC_MAGIC_METHODS_WHITELIST
from wemake_python_styleguide.violations.oop import AsyncMagicMethodViolation
from wemake_python_styleguide.visitors.ast.classes import WrongMethodVisitor
sync_method = """
class Example(object):
de... | method) | added | f523fd90f4a199b9e4583ecdc60cad7265f138bad34d444131296995fde32fd9 | assert_*|test_wrong_async_magic_used|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.constants import ASYNC_MAGIC_METHODS_WHITELIST from wemake_python_styleguide.violations.oop import AsyncMagicMethodViolation from wemake_python_styleguide.visitors.ast.classes import WrongMethodVisitor sync_method =... | null | null | null |
wemake-services/wemake-python-styleguide | train | 231 | 113bfea2ad524ae4e1282dc818d55697e8814108 | train | tests/test_visitors/test_ast/test_classes/test_methods/test_magic_methods.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_methods/test_magic_methods.py | 32 | 4 | assert_* | test_wrong_magic_used | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.constants import MAGIC_METHODS_BLACKLIST
from wemake_python_styleguide.violations.oop import BadMagicMethodViolation
from wemake_python_styleguide.visitors.ast.classes import WrongMethodVisitor
magic_method = """
class Example(object):
def {0}(s... | method) | modified | 5a3fc713a286003a30bef819afc346c3a5efda1cbf09a40cf5f7dcc7e8679a9d | assert_*|test_wrong_magic_used|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.constants import MAGIC_METHODS_BLACKLIST from wemake_python_styleguide.violations.oop import BadMagicMethodViolation from wemake_python_styleguide.visitors.ast.classes import WrongMethodVisitor magic_method = """ class Ex... | method) | 33 | 4 |
wemake-services/wemake-python-styleguide | train | 231 | 113bfea2ad524ae4e1282dc818d55697e8814108 | train | tests/test_visitors/test_ast/test_classes/test_methods/test_yield_inside_init.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_methods/test_yield_inside_init.py | 46 | 4 | assert_* | test_init_generator | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
YieldInsideInitViolation,
)
from wemake_python_styleguide.visitors.ast.classes import WrongMethodVisitor
init_without_yield = """
class ModuleMembersVisitor(object):
def __init__(self, *args, **kwargs):
... | [YieldInsideInitViolation]) | modified | b3c62a972acd206f771cdff668396da3501ea6530d8af9aa09b5fd09e3605c96 | assert_*|test_init_generator|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( YieldInsideInitViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongMethodVisitor init_without_yield = """ class ModuleMembersVisitor(object): def __init__(self, *ar... | [YieldInsideInitViolation]) | 47 | 4 |
wemake-services/wemake-python-styleguide | train | 232 | 14ef43df0943169135629b5c404d7de6bf6108cf | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 171 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | a19c18d4b998fa90e4e31d620ff82e042ee2f784449325616c29118c340d4dac | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 170 | 8 | |
wemake-services/wemake-python-styleguide | train | 232 | 14ef43df0943169135629b5c404d7de6bf6108cf | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 174 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | 0c327fa280a31c5ad1d84fc7c4becbc98a761dfdf38c971338b7327cdc3213d2 | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 173 | 8 | |
wemake-services/wemake-python-styleguide | train | 232 | 14ef43df0943169135629b5c404d7de6bf6108cf | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 175 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors.get(found_error) | modified | 0feb845ef009122377360fc71f6364b63718634725ac974dc39c525d5fc86b72 | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors.get(found_error) | 174 | 8 | |
wemake-services/wemake-python-styleguide | train | 232 | 14ef43df0943169135629b5c404d7de6bf6108cf | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 203 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | len(all_violations) | modified | 918e17302f2ba7072bb15a5fb4c6e37c97836ed11466eb184c4faf3ea0c6b7ea | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since ... | len(all_violations) | 202 | 4 |
wemake-services/wemake-python-styleguide | train | 232 | 14ef43df0943169135629b5c404d7de6bf6108cf | train | tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_number_meaningless_zeros.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_number_meaningless_zeros.py | 73 | 4 | assert_* | test_meaningless_zeros | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
NumberWithMeaninglessZeroViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongNumberTokenVisitor,
)
@pytest.mark.parametrize('number', [
'0x01',
'0x00A',
'0e00',
... | [NumberWithMeaninglessZeroViolation]) | added | 64ac442af3f82f0b6b39f8abd0e89e0408c92106cbd86568535b257a91be8b11 | assert_*|test_meaningless_zeros|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( NumberWithMeaninglessZeroViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) @pytest.mark.parametrize('number', [ '0x01', '0x00A', '... | null | null | null |
wemake-services/wemake-python-styleguide | train | 232 | 14ef43df0943169135629b5c404d7de6bf6108cf | train | tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_number_meaningless_zeros.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_number_meaningless_zeros.py | 74 | 4 | assert_* | test_meaningless_zeros | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
NumberWithMeaninglessZeroViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongNumberTokenVisitor,
)
@pytest.mark.parametrize('number', [
'0x01',
'0x00A',
'0e00',
... | number.lstrip('-').lstrip('+')) | added | 842ef9293ddd5ea0e73e9e3de8e7a89bff55a59b642b757c5bcc6637b58016ac | assert_*|test_meaningless_zeros|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( NumberWithMeaninglessZeroViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) @pytest.mark.parametrize('number', [ '0x01', '0x00A', '... | null | null | null |
wemake-services/wemake-python-styleguide | train | 232 | 14ef43df0943169135629b5c404d7de6bf6108cf | 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 | 53 | 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', [
'0X1',
'0X1A',
'0XFF',
'0Xe',
... | [BadNumberSuffixViolation]) | added | d8bcbffe5d644f1ba93fe4a4f69e5b3863c668c6a1769e2511d1e1c7e860e5e0 | 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', [ '0X1', '0X1A', '0XFF', '0X... | null | null | null |
wemake-services/wemake-python-styleguide | train | 232 | 14ef43df0943169135629b5c404d7de6bf6108cf | 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 | 54 | 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', [
'0X1',
'0X1A',
'0XFF',
'0Xe',
... | number.lstrip('-').lstrip('+')) | added | 40d40e75deaff49e94fccb3a9d444b0503130f185d9023e9ab41ec09d84ecd63 | 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', [ '0X1', '0X1A', '0XFF', '0X... | null | null | null |
wemake-services/wemake-python-styleguide | train | 233 | 6846d2a9d2b4f871d9510d1cea4e7e1fb4b890bd | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 212 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from some import _protected # noqa: WPS436
from .version import get_version # noqa: WPS300
... | hex_number | modified | 1049fd4bed2c67e4752be822cf5f3b8651b00b0db937c45351e046d7e12477f3 | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ful... | hex_number | 212 | 0 | |
wemake-services/wemake-python-styleguide | train | 233 | 6846d2a9d2b4f871d9510d1cea4e7e1fb4b890bd | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 172 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | cc33fcbf5bc3f6ddb3d66aa1163f8534a0a2895c48fdd282088c4fb49d6445cb | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 171 | 8 | |
wemake-services/wemake-python-styleguide | train | 233 | 6846d2a9d2b4f871d9510d1cea4e7e1fb4b890bd | train | tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_number_meaningless_zeros.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_number_meaningless_zeros.py | 85 | 4 | assert_* | test_meaningless_zeros | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
BadNumberSuffixViolation,
NumberWithMeaninglessZeroViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongNumberTokenVisitor,
)
@pytest.mark.parametrize('number', [
'0.1... | number.lstrip('-').lstrip('+')) | added | b4986bbc9256f30a60ae5983e17be4d03b3f6d910ff4fbd629633c2e7650194d | assert_*|test_meaningless_zeros|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( BadNumberSuffixViolation, NumberWithMeaninglessZeroViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) @pytest.mark.parametrize('num... | null | null | null |
wemake-services/wemake-python-styleguide | train | 233 | 6846d2a9d2b4f871d9510d1cea4e7e1fb4b890bd | 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 | 53 | 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', [
'0X1',
'0X1A',
'0XFF',
'0Xe',
... | [BadNumberSuffixViolation]) | modified | e7386a26e22532b3268e3ba1ad805e858a59fe24b9626d0112ffe7f6adca75b3 | 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', [ '0X1', '0X1A', '0XFF', '0X... | [BadNumberSuffixViolation]) | 53 | 4 |
wemake-services/wemake-python-styleguide | train | 233 | 6846d2a9d2b4f871d9510d1cea4e7e1fb4b890bd | 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 | 54 | 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', [
'0X1',
'0X1A',
'0XFF',
'0Xe',
... | number.lstrip('-').lstrip('+')) | modified | 41b157a0610b45d65e0b2ce57ce585d53bde26e2d6fd46ba8ffceb294ee4e776 | 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', [ '0X1', '0X1A', '0XFF', '0X... | number.lstrip('-').lstrip('+')) | 54 | 4 |
wemake-services/wemake-python-styleguide | train | 233 | 6846d2a9d2b4f871d9510d1cea4e7e1fb4b890bd | 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 (
NumberWithMeaninglessZeroViolation,
PartialFloatViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongNumberTokenVisitor,
)
@pytest.mark.parametrize('primitive', [
'10.... | [PartialFloatViolation]) | modified | aad205a852c96524e4e43c652b27ec4df6350649bb8308810b3404eb4c8262f4 | assert_*|test_partial_float|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( NumberWithMeaninglessZeroViolation, PartialFloatViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) @pytest.mark.parametrize('primitive'... | [PartialFloatViolation]) | 36 | 4 |
wemake-services/wemake-python-styleguide | train | 233 | 6846d2a9d2b4f871d9510d1cea4e7e1fb4b890bd | 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 | 87 | 4 | assert_* | test_double_incorrect_float | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
NumberWithMeaninglessZeroViolation,
PartialFloatViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongNumberTokenVisitor,
)
@pytest.mark.parametrize('primitive', [
'10.... | [ PartialFloatViolation, NumberWithMeaninglessZeroViolation, ]) | added | 3b1d275fe61bf5f24658d9f581721bec8ec11f1ac5a9764ec96eac011d920058 | assert_*|test_double_incorrect_float|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( NumberWithMeaninglessZeroViolation, PartialFloatViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) @pytest.mark.parametrize('p... | null | null | null |
wemake-services/wemake-python-styleguide | train | 233 | 6846d2a9d2b4f871d9510d1cea4e7e1fb4b890bd | train | tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_positive_exponent.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_positive_exponent.py | 46 | 4 | assert_* | test_positive_exponent | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
BadNumberSuffixViolation,
NumberWithMeaninglessZeroViolation,
PositiveExponentViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongNumberTokenVisitor,
)
@pytest.mark.p... | [PositiveExponentViolation]) | added | c11a87ddafae57a97248e0aacf389f1e7f46b28edc84f47ebf79d18c2f18da9f | assert_*|test_positive_exponent|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( BadNumberSuffixViolation, NumberWithMeaninglessZeroViolation, PositiveExponentViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) @p... | null | null | null |
wemake-services/wemake-python-styleguide | train | 234 | 372cc6b23cbd04bd517d1bb9c8517e3d5453788c | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 176 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | e789fb072aa1ddf5097250062afe07d72af2087ed70f78a9a9ff35fb61803d8d | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 175 | 8 | |
wemake-services/wemake-python-styleguide | train | 234 | 372cc6b23cbd04bd517d1bb9c8517e3d5453788c | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 177 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors.get(found_error) | modified | be795cd3f4bc2025f0cde36f1803279b9efaec1e14dac985cc5806da9bde08bd | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors.get(found_error) | 176 | 8 | |
wemake-services/wemake-python-styleguide | train | 234 | 372cc6b23cbd04bd517d1bb9c8517e3d5453788c | train | tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_number_meaningless_zeros.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_number_meaningless_zeros.py | 51 | 4 | assert_* | test_meaningless_zeros | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
BadNumberSuffixViolation,
NumberWithMeaninglessZeroViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongNumberTokenVisitor,
)
@pytest.mark.parametrize('number', [
'0.1... | [NumberWithMeaninglessZeroViolation]) | added | ad6c3e072a775de6658409ddaff60f926ee0dce7b29dae1c5809ca5dec9d36a7 | assert_*|test_meaningless_zeros|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( BadNumberSuffixViolation, NumberWithMeaninglessZeroViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) @pytest.mark.parametrize('num... | null | null | null |
wemake-services/wemake-python-styleguide | train | 234 | 372cc6b23cbd04bd517d1bb9c8517e3d5453788c | train | tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_number_meaningless_zeros.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_number_meaningless_zeros.py | 52 | 4 | assert_* | test_meaningless_zeros | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
BadNumberSuffixViolation,
NumberWithMeaninglessZeroViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongNumberTokenVisitor,
)
@pytest.mark.parametrize('number', [
'0.1... | number.lstrip('-').lstrip('+')) | added | 45aac899bd5bc38059f9f8b35a34d4717e17a1ab938840eccee0215610dfeb75 | assert_*|test_meaningless_zeros|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( BadNumberSuffixViolation, NumberWithMeaninglessZeroViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) @pytest.mark.parametrize('num... | null | null | null |
wemake-services/wemake-python-styleguide | train | 234 | 372cc6b23cbd04bd517d1bb9c8517e3d5453788c | 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 | 40 | 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', [
'0X1',
'0X1A',
'0XFF',
'0XE',
... | [BadNumberSuffixViolation]) | added | 3f88849cdcf8cab0865111943f44763c8c1a95f8d605d90df88e1ec33cfb0902 | 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', [ '0X1', '0X1A', '0XFF', '0X... | null | null | null |
wemake-services/wemake-python-styleguide | train | 234 | 372cc6b23cbd04bd517d1bb9c8517e3d5453788c | 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 | 41 | 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', [
'0X1',
'0X1A',
'0XFF',
'0XE',
... | number.lstrip('-').lstrip('+')) | added | f243479818c0a068e4e66aa07beb3c832cb1e6571aee73cad0f5e48d7d46f755 | 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', [ '0X1', '0X1A', '0XFF', '0X... | null | null | null |
wemake-services/wemake-python-styleguide | train | 234 | 372cc6b23cbd04bd517d1bb9c8517e3d5453788c | train | tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_wrong_hex_case.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_wrong_hex_case.py | 46 | 4 | assert_* | test_hex_wrong_case | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
BadNumberSuffixViolation,
WrongHexNumberCaseViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongNumberTokenVisitor,
)
hex_number_templates = [
'0x{0}',
'0xA{0}',
... | [WrongHexNumberCaseViolation]) | added | 3a5c9c8765aff71213a74251bd1be99806bf0a8c5644eeef442e45cc9f7ebd66 | assert_*|test_hex_wrong_case|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( BadNumberSuffixViolation, WrongHexNumberCaseViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) hex_number_templates = [ '0x{0}', '0xA{... | null | null | null |
wemake-services/wemake-python-styleguide | train | 234 | 372cc6b23cbd04bd517d1bb9c8517e3d5453788c | train | tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_wrong_hex_case.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_numbers/test_wrong_hex_case.py | 47 | 4 | assert_* | test_hex_wrong_case | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
BadNumberSuffixViolation,
WrongHexNumberCaseViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongNumberTokenVisitor,
)
hex_number_templates = [
'0x{0}',
'0xA{0}',
... | real_number) | added | 303c509bb9097e5c4031def16b057b2987c370a8728106a9a0f3f105d30da614 | assert_*|test_hex_wrong_case|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( BadNumberSuffixViolation, WrongHexNumberCaseViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongNumberTokenVisitor, ) hex_number_templates = [ '0x{0}', '0xA{... | null | null | null |
wemake-services/wemake-python-styleguide | train | 235 | 8db5237a733ae9a14839ef030848228acc2e2fe3 | 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 | 400 | 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.violations.consistency import (
UselessExceptCaseViolation,
)
from wemake_python_styleguide.visitors.ast.exceptions import (
WrongTry... | UselessExceptCaseViolation) | added | 58b28d492157c13a1d3e4a498d75ab6930d48ef4a6cf85eeeaaa684f28b48b8b | 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.violations.consistency import ( UselessExceptCaseViolation, ) from wemake_python_styleguide.visitors.... | null | null | null |
wemake-services/wemake-python-styleguide | train | 235 | 8db5237a733ae9a14839ef030848228acc2e2fe3 | 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 | 446 | 4 | assert_* | test_correct_return_path_in_try_except | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
TryExceptMultipleReturnPathViolation,
)
from wemake_python_styleguide.violations.consistency import (
UselessExceptCaseViolation,
)
from wemake_python_styleguide.visitors.ast.exceptions import (
WrongTry... | UselessExceptCaseViolation) | added | ea05d8769d8ff4becc0543d62dbc51729dba7e373e2e8968b478fa2c1c5d1a9b | assert_*|test_correct_return_path_in_try_except|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( TryExceptMultipleReturnPathViolation, ) from wemake_python_styleguide.violations.consistency import ( UselessExceptCaseViolation, ) from wemake_python_styleguide.visitor... | null | null | null |
wemake-services/wemake-python-styleguide | train | 235 | 8db5237a733ae9a14839ef030848228acc2e2fe3 | 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 | 499 | 4 | assert_* | test_different_nodes_trigger_violation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
TryExceptMultipleReturnPathViolation,
)
from wemake_python_styleguide.violations.consistency import (
UselessExceptCaseViolation,
)
from wemake_python_styleguide.visitors.ast.exceptions import (
WrongTry... | [TryExceptMultipleReturnPathViolation]) | added | 0434e5e634aad3bf2bf59bd16777ccd1bd2981bdada19577530a615526448190 | assert_*|test_different_nodes_trigger_violation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( TryExceptMultipleReturnPathViolation, ) from wemake_python_styleguide.violations.consistency import ( UselessExceptCaseViolation, ) from wemake_python_styleguide.visitor... | null | null | null |
wemake-services/wemake-python-styleguide | train | 236 | be9abebee6765c391dbf526fa37de894c53c1e71 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 175 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | 3f306dd0a4b3cb11c8cfca1870f304a785b6f5b1f7dbf47da69b558be7142f63 | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 173 | 8 | |
wemake-services/wemake-python-styleguide | train | 236 | be9abebee6765c391dbf526fa37de894c53c1e71 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 179 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors.get(found_error) | modified | fb2bfb3e96f4948f145106c92af33a0b202d442fdb7772cf034971a4e388af94 | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors.get(found_error) | 177 | 8 | |
wemake-services/wemake-python-styleguide | train | 236 | be9abebee6765c391dbf526fa37de894c53c1e71 | train | tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_implicit_raw_strings.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_implicit_raw_strings.py | 34 | 4 | assert_* | test_implicit_raw_string | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
ImplicitRawStringViolation,
UnicodeStringViolation,
UppercaseStringModifierViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongStringTokenVisitor,
)
@pytest.mark.para... | [ImplicitRawStringViolation]) | added | 96f615702274deb5d156f1d260db859f8e3d5a391000da56d839ae92a5e2e17e | assert_*|test_implicit_raw_string|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitRawStringViolation, UnicodeStringViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @py... | null | null | null |
wemake-services/wemake-python-styleguide | train | 236 | be9abebee6765c391dbf526fa37de894c53c1e71 | train | tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_implicit_raw_strings.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_implicit_raw_strings.py | 79 | 4 | assert_* | test_implicit_unicode_raw_string | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
ImplicitRawStringViolation,
UnicodeStringViolation,
UppercaseStringModifierViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongStringTokenVisitor,
)
@pytest.mark.para... | [ UnicodeStringViolation, ImplicitRawStringViolation, ]) | added | 03102998cf4b867623b4f7d31de577607b208e4780c173df462b4c935553d9bf | assert_*|test_implicit_unicode_raw_string|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitRawStringViolation, UnicodeStringViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisito... | null | null | null |
wemake-services/wemake-python-styleguide | train | 236 | be9abebee6765c391dbf526fa37de894c53c1e71 | train | tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_implicit_raw_strings.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_implicit_raw_strings.py | 103 | 4 | assert_* | test_implicit_upercase_unicode_raw_string | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
ImplicitRawStringViolation,
UnicodeStringViolation,
UppercaseStringModifierViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongStringTokenVisitor,
)
@pytest.mark.para... | [ UnicodeStringViolation, UppercaseStringModifierViolation, ImplicitRawStringViolation, ]) | added | ecf74fddfa272ecd902262aa59d7ceb2ef0196278e85157d7fb16241c6fa2a04 | assert_*|test_implicit_upercase_unicode_raw_string|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitRawStringViolation, UnicodeStringViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTo... | null | null | null |
wemake-services/wemake-python-styleguide | train | 236 | be9abebee6765c391dbf526fa37de894c53c1e71 | train | tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_unicode_escape.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_unicode_escape.py | 35 | 4 | assert_* | test_wrong_unicode_escape | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
WrongUnicodeEscapeViolation,
)
from wemake_python_styleguide.violations.consistency import (
UnicodeStringViolation,
UppercaseStringModifierViolation,
)
from wemake_python_styleguide.visitors.tokenize.pr... | [WrongUnicodeEscapeViolation]) | added | b726bedf844a413a0cfccf780c709e064848d431bf4d699105caa9396545e795 | assert_*|test_wrong_unicode_escape|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongUnicodeEscapeViolation, ) from wemake_python_styleguide.violations.consistency import ( UnicodeStringViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide... | null | null | null |
wemake-services/wemake-python-styleguide | train | 236 | be9abebee6765c391dbf526fa37de894c53c1e71 | train | tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_unicode_escape.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_unicode_escape.py | 77 | 4 | assert_* | test_correct_unicode_string_escape | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
WrongUnicodeEscapeViolation,
)
from wemake_python_styleguide.violations.consistency import (
UnicodeStringViolation,
UppercaseStringModifierViolation,
)
from wemake_python_styleguide.visitors.tokenize.pr... | [UnicodeStringViolation]) | added | 64dcb8d34273c76dd8904ec1dc9e4ab08c740b2d9060c390447e35c199d8dc38 | assert_*|test_correct_unicode_string_escape|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongUnicodeEscapeViolation, ) from wemake_python_styleguide.violations.consistency import ( UnicodeStringViolation, UppercaseStringModifierViolation, ) from wemake_python_s... | null | null | null |
wemake-services/wemake-python-styleguide | train | 236 | be9abebee6765c391dbf526fa37de894c53c1e71 | train | tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_unicode_escape.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_unicode_escape.py | 98 | 4 | assert_* | test_correct_unicode_upper_string_escape | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
WrongUnicodeEscapeViolation,
)
from wemake_python_styleguide.violations.consistency import (
UnicodeStringViolation,
UppercaseStringModifierViolation,
)
from wemake_python_styleguide.visitors.tokenize.pr... | [ UnicodeStringViolation, UppercaseStringModifierViolation, ]) | added | 94a4862262857beb72111de56d89df559602aa387174e9e602c8d8551b577d52 | assert_*|test_correct_unicode_upper_string_escape|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongUnicodeEscapeViolation, ) from wemake_python_styleguide.violations.consistency import ( UnicodeStringViolation, UppercaseStringModifierViolation, ) from wemake_py... | null | null | null |
wemake-services/wemake-python-styleguide | train | 237 | eae347ab451812a524cac2a82f7fa513f414b798 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 176 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | 1fe739884c1fe76fdb7b97c48dd7edd9e2ba9efbd64cd1e939d13bbf35b4b5c9 | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 175 | 8 | |
wemake-services/wemake-python-styleguide | train | 237 | eae347ab451812a524cac2a82f7fa513f414b798 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 179 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | 14942fc3ea4176bef56437d911949e0e90e3cbcd0ea3ab7fc321e0bd62a2ae12 | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 178 | 8 | |
wemake-services/wemake-python-styleguide | train | 237 | eae347ab451812a524cac2a82f7fa513f414b798 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 180 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors.get(found_error) | modified | 02fe950b046df402b1a4c73f090a07859648c0494f4b51d903f1a7ac5a3bd467 | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors.get(found_error) | 179 | 8 | |
wemake-services/wemake-python-styleguide | train | 237 | eae347ab451812a524cac2a82f7fa513f414b798 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 208 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | len(all_violations) | modified | c2b5f2c1d29f070fc763cfcac1dce5fd0ea6769173e1c49d6823792743923091 | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since ... | len(all_violations) | 207 | 4 |
wemake-services/wemake-python-styleguide | train | 237 | eae347ab451812a524cac2a82f7fa513f414b798 | train | tests/test_visitors/test_tokenize/test_conditions/test_implicit_elif.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_conditions/test_implicit_elif.py | 85 | 4 | assert_* | test_implicit_elif_statements | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.refactoring import (
ImplicitElifViolation,
)
from wemake_python_styleguide.visitors.tokenize.conditions import IfElseVisitor
# Correct:
elif_cases = """
if some:
...
elif other:
...
elif third:
...
else:
...
"""
if_... | [ImplicitElifViolation]) | added | b54d9234e38f919b2ce5307295287871279518acfedfa2ede89e66c010aa92a2 | assert_*|test_implicit_elif_statements|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( ImplicitElifViolation, ) from wemake_python_styleguide.visitors.tokenize.conditions import IfElseVisitor # Correct: elif_cases = """ if some: ... elif other: ... elif third: ... els... | null | null | null |
wemake-services/wemake-python-styleguide | train | 237 | eae347ab451812a524cac2a82f7fa513f414b798 | train | tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_implicit_raw_strings.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_implicit_raw_strings.py | 36 | 4 | assert_* | test_implicit_raw_string | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
ImplicitRawStringViolation,
UnicodeStringViolation,
UppercaseStringModifierViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongStringTokenVisitor,
)
@pytest.mark.para... | [ImplicitRawStringViolation]) | modified | 18b07342c98717a6929e6af4338431d252058cee183df473bf07e4a371957e3e | assert_*|test_implicit_raw_string|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitRawStringViolation, UnicodeStringViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @py... | [ImplicitRawStringViolation]) | 34 | 4 |
wemake-services/wemake-python-styleguide | train | 237 | eae347ab451812a524cac2a82f7fa513f414b798 | train | tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_implicit_raw_strings.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_implicit_raw_strings.py | 83 | 4 | assert_* | test_implicit_unicode_raw_string | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
ImplicitRawStringViolation,
UnicodeStringViolation,
UppercaseStringModifierViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongStringTokenVisitor,
)
@pytest.mark.para... | [ UnicodeStringViolation, ImplicitRawStringViolation, ]) | added | ef9b5545fb860f5b54b3dbaef99aabc1acd8766d5ca5f1cdf31bf0f5cd4e9c3d | assert_*|test_implicit_unicode_raw_string|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitRawStringViolation, UnicodeStringViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisito... | null | null | null |
wemake-services/wemake-python-styleguide | train | 237 | eae347ab451812a524cac2a82f7fa513f414b798 | train | tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_implicit_raw_strings.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_implicit_raw_strings.py | 107 | 4 | assert_* | test_implicit_upercase_unicode_raw_string | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
ImplicitRawStringViolation,
UnicodeStringViolation,
UppercaseStringModifierViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongStringTokenVisitor,
)
@pytest.mark.para... | [ UnicodeStringViolation, UppercaseStringModifierViolation, ImplicitRawStringViolation, ]) | added | f0b686aa6496c06acda941b7576a423e037a852bb73daab766e8d26b7c6fd4bf | assert_*|test_implicit_upercase_unicode_raw_string|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitRawStringViolation, UnicodeStringViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTo... | null | null | null |
wemake-services/wemake-python-styleguide | train | 238 | dd5e6ec7263676ad8b1d519d9f7d9056ae261b3a | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 208 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from some import _protected # noqa: WPS436
from .version import get_version # noqa: WPS300
... | octal_number | added | 37ff6c625a593ff851e28d7d0a054667badfc45277f4ffe5133c9d5e335d62ef | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ful... | null | null | null | |
wemake-services/wemake-python-styleguide | train | 238 | dd5e6ec7263676ad8b1d519d9f7d9056ae261b3a | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 219 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from some import _protected # noqa: WPS436
from .version import get_version # noqa: WPS300
... | hex_number | added | 50aed1f92cd3e2ca659c6f42b506b55e1157d523e62e2d98f46f527b50aae658 | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ful... | null | null | null | |
wemake-services/wemake-python-styleguide | train | 238 | dd5e6ec7263676ad8b1d519d9f7d9056ae261b3a | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 177 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | b3e92cab4ba4a854716c78c79dfe539e8d9cb8f1f3db810cb64acfad43679343 | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 176 | 8 | |
wemake-services/wemake-python-styleguide | train | 238 | dd5e6ec7263676ad8b1d519d9f7d9056ae261b3a | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 180 | 8 | assert | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | errors | modified | 449c0c64a170a154e318623d23400300a78f23943f23b4685166b52444b92e3d | assert||# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since we obviously use a lot of ... | errors | 179 | 8 | |
wemake-services/wemake-python-styleguide | train | 238 | dd5e6ec7263676ad8b1d519d9f7d9056ae261b3a | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 209 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
import re
import subprocess
import types
from collections import Counter
ERROR_PATTERN = re.compile(r'(WPS\d{3})')
IGNORED_VIOLATIONS = (
'WPS202', # since our test case is complex, that's fine
'WPS226', # we have a lot of ugly strings inside,
'WPS402', # since we obviously use ... | len(all_violations) | modified | 6f578aa94815721455f3fc9fe93fa4d84cf61859c8c9b0ffdf598494bfa867f2 | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- import re import subprocess import types from collections import Counter ERROR_PATTERN = re.compile(r'(WPS\d{3})') IGNORED_VIOLATIONS = ( 'WPS202', # since our test case is complex, that's fine 'WPS226', # we have a lot of ugly strings inside, 'WPS402', # since ... | len(all_violations) | 208 | 4 |
wemake-services/wemake-python-styleguide | train | 238 | dd5e6ec7263676ad8b1d519d9f7d9056ae261b3a | train | tests/test_visitors/test_ast/test_complexity/test_counts/test_try_body_length.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_try_body_length.py | 96 | 4 | assert_* | test_try_body_count_default | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.complexity import (
TooLongTryBodyViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.counts import (
TryExceptVisitor,
)
try_without_except = """
try:
{0}
finally:
...
"""
simple_try_except = """
try:
... | [TooLongTryBodyViolation]) | added | ece1952eb3208c3b8e675b1f5456a9a9fd6d5757ae17a20d986f9f5fd959d0af | assert_*|test_try_body_count_default|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooLongTryBodyViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( TryExceptVisitor, ) try_without_except = """ try: {0} finally: ... """ simple_try_excep... | null | null | null |
wemake-services/wemake-python-styleguide | train | 238 | dd5e6ec7263676ad8b1d519d9f7d9056ae261b3a | train | tests/test_visitors/test_ast/test_complexity/test_counts/test_try_body_length.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_try_body_length.py | 124 | 4 | assert_* | test_try_body_count_custom_options | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.complexity import (
TooLongTryBodyViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.counts import (
TryExceptVisitor,
)
try_without_except = """
try:
{0}
finally:
...
"""
simple_try_except = """
try:
... | [TooLongTryBodyViolation]) | added | 27f585165a5a800e7fa69f1b62bbbf314293456aeb243086edca02cb653672be | assert_*|test_try_body_count_custom_options|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooLongTryBodyViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( TryExceptVisitor, ) try_without_except = """ try: {0} finally: ... """ simple_tr... | null | null | null |
wemake-services/wemake-python-styleguide | train | 238 | dd5e6ec7263676ad8b1d519d9f7d9056ae261b3a | train | tests/test_visitors/test_ast/test_complexity/test_counts/test_try_except.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_try_except.py | 73 | 4 | assert_* | test_try_except_count_default | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.complexity import (
TooManyExceptCasesViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.counts import (
TryExceptVisitor,
)
try_without_except = """
try:
...
finally:
...
"""
simple_try_except = """
try:
... | [TooManyExceptCasesViolation]) | added | e3c93fb129df9ef4754c58dc9f46e88f233a19f9171a7431ce0806f6cde109a8 | assert_*|test_try_except_count_default|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooManyExceptCasesViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( TryExceptVisitor, ) try_without_except = """ try: ... finally: ... """ simple_try... | null | null | null |
wemake-services/wemake-python-styleguide | train | 239 | 335b627ee46032ba21f2bc2e39570bee12c920d7 | train | tests/test_visitors/test_ast/test_loops/test_loops/test_iter_type.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_loops/test_iter_type.py | 44 | 4 | assert_* | test_iter_incorrect_type | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
WrongLoopIterTypeViolation,
)
from wemake_python_styleguide.visitors.ast.loops import (
WrongLoopDefinitionVisitor,
)
for_loop_template = """
def function():
for index in {0}:
...
"""
@pytest.mar... | [WrongLoopIterTypeViolation]) | modified | 833b4195cd8b893d26f5ffc11e40e927fba3d11958ebf9b4b52ee642c9e53746 | assert_*|test_iter_incorrect_type|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( WrongLoopIterTypeViolation, ) from wemake_python_styleguide.visitors.ast.loops import ( WrongLoopDefinitionVisitor, ) for_loop_template = """ def function(): for index in {0}: ... """ @p... | [WrongLoopIterTypeViolation]) | 42 | 4 |
wemake-services/wemake-python-styleguide | train | 240 | a985085e6008926c4b381ab97754a60c61b97b44 | train | tests/test_visitors/test_ast/test_classes/test_class_attributes/test_slots_syntax.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_class_attributes/test_slots_syntax.py | 78 | 4 | assert_* | test_incorrect_slots | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.oop import WrongSlotsViolation
from wemake_python_styleguide.visitors.ast.classes import WrongSlotsVisitor
class_body_template = """
class ClassWithSlots(object):
__slots__ = {0}
"""
class_body_typed_template = """
class ClassWithSlo... | [WrongSlotsViolation]) | added | 9122eb0b7941e37a11f49569c522d5a58d5300c0282b09a2a27f8dc29f117b21 | assert_*|test_incorrect_slots|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.oop import WrongSlotsViolation from wemake_python_styleguide.visitors.ast.classes import WrongSlotsVisitor class_body_template = """ class ClassWithSlots(object): __slots__ = {0} """ class_body_typed_template = ... | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.