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 | 99 | a4aa15574ec42f0084a5062e16f155aeeb346881 | train | tests/test_visitors/test_ast/test_naming/test_naming_rules/test_wrong_names.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_naming_rules/test_wrong_names.py | 29 | 4 | assert_* | test_wrong_variable_name | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.constants import VARIABLE_NAMES_BLACKLIST
from wemake_python_styleguide.violations.naming import (
WrongVariableNameViolation,
)
from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor
@pytest.mark.parametrize('wrong_name', VA... | wrong_name) | added | b3ca8f45b21e68c5328deb3eb2e89c9603f30d67b1a77a50b472d882b31904cf | assert_*|test_wrong_variable_name|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.constants import VARIABLE_NAMES_BLACKLIST from wemake_python_styleguide.violations.naming import ( WrongVariableNameViolation, ) from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor @pytest.mark.pa... | null | null | null |
wemake-services/wemake-python-styleguide | train | 100 | 46052ce0745ae48716f76356982516f30e78d18d | train | tests/test_visitors/test_ast/test_imports/test_future_imports.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_imports/test_future_imports.py | 39 | 4 | assert_* | test_wrong_future_import | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.constants import FUTURE_IMPORTS_WHITELIST
from wemake_python_styleguide.violations.best_practices import (
FutureImportViolation,
)
from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor
future_import = 'from __future__ imp... | [FutureImportViolation]) | modified | 911bd5e2ad106e69d395d7d721ca443cf8cced26c71f300b26f67d4f379a044f | assert_*|test_wrong_future_import|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.constants import FUTURE_IMPORTS_WHITELIST from wemake_python_styleguide.violations.best_practices import ( FutureImportViolation, ) from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor future_im... | [FutureImportViolation]) | 39 | 4 |
wemake-services/wemake-python-styleguide | train | 100 | 46052ce0745ae48716f76356982516f30e78d18d | train | tests/test_visitors/test_ast/test_imports/test_future_imports.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_imports/test_future_imports.py | 40 | 4 | assert_* | test_wrong_future_import | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.constants import FUTURE_IMPORTS_WHITELIST
from wemake_python_styleguide.violations.best_practices import (
FutureImportViolation,
)
from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor
future_import = 'from __future__ imp... | to_import) | modified | ac6042e6ae0cbe8581eebb8d1456f4fb8e059c1df9bac11c58117bc390d06737 | assert_*|test_wrong_future_import|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.constants import FUTURE_IMPORTS_WHITELIST from wemake_python_styleguide.violations.best_practices import ( FutureImportViolation, ) from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor future_im... | to_import) | 40 | 4 |
wemake-services/wemake-python-styleguide | train | 100 | 46052ce0745ae48716f76356982516f30e78d18d | train | tests/test_visitors/test_ast/test_imports/test_future_imports.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_imports/test_future_imports.py | 56 | 4 | assert_* | test_wrong_multiple_future_import | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.constants import FUTURE_IMPORTS_WHITELIST
from wemake_python_styleguide.violations.best_practices import (
FutureImportViolation,
)
from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor
future_import = 'from __future__ imp... | [FutureImportViolation, FutureImportViolation]) | modified | f894d0c9c4a26ff528a6045b3ee1ffa201ae274f50c9363409976ebb6d3756ed | assert_*|test_wrong_multiple_future_import|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.constants import FUTURE_IMPORTS_WHITELIST from wemake_python_styleguide.violations.best_practices import ( FutureImportViolation, ) from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor ... | [FutureImportViolation, FutureImportViolation]) | 56 | 4 |
wemake-services/wemake-python-styleguide | train | 100 | 46052ce0745ae48716f76356982516f30e78d18d | train | tests/test_visitors/test_ast/test_keywords/test_global.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_global.py | 68 | 4 | assert_* | test_global_keywords | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
WrongKeywordViolation,
)
from wemake_python_styleguide.visitors.ast.keywords import WrongKeywordVisitor
global_in_module = """
global some
some = 0
"""
global_in_function = """
some = 0
def check_global():
... | 'global') | modified | 1e4fc7a4a6e1ddeac66d93343bcfc372e6883f316e2fc7d726444aee4360b37c | assert_*|test_global_keywords|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongKeywordViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongKeywordVisitor global_in_module = """ global some some = 0 """ global_in_function = """ some = 0 d... | 'global') | 68 | 4 |
wemake-services/wemake-python-styleguide | train | 100 | 46052ce0745ae48716f76356982516f30e78d18d | train | tests/test_visitors/test_ast/test_keywords/test_global.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_global.py | 89 | 4 | assert_* | test_nonlocal_keywords | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
WrongKeywordViolation,
)
from wemake_python_styleguide.visitors.ast.keywords import WrongKeywordVisitor
global_in_module = """
global some
some = 0
"""
global_in_function = """
some = 0
def check_global():
... | [WrongKeywordViolation]) | modified | bdad8c0f340f35b16e1488adfdce8fcc25e8d946ed6a4d773f28bb06fdd63d4d | assert_*|test_nonlocal_keywords|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongKeywordViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongKeywordVisitor global_in_module = """ global some some = 0 """ global_in_function = """ some = 0... | [WrongKeywordViolation]) | 89 | 4 |
wemake-services/wemake-python-styleguide | train | 100 | 46052ce0745ae48716f76356982516f30e78d18d | train | tests/test_visitors/test_ast/test_keywords/test_global.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_global.py | 90 | 4 | assert_* | test_nonlocal_keywords | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
WrongKeywordViolation,
)
from wemake_python_styleguide.visitors.ast.keywords import WrongKeywordVisitor
global_in_module = """
global some
some = 0
"""
global_in_function = """
some = 0
def check_global():
... | 'nonlocal') | modified | 77a41e307581282004fb8099bdc466615ef1504d4abf741d331cfd566942429f | assert_*|test_nonlocal_keywords|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongKeywordViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongKeywordVisitor global_in_module = """ global some some = 0 """ global_in_function = """ some = 0... | 'nonlocal') | 90 | 4 |
wemake-services/wemake-python-styleguide | train | 100 | 46052ce0745ae48716f76356982516f30e78d18d | train | tests/test_visitors/test_ast/test_naming/test_naming_rules/test_restricted_argument.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_naming_rules/test_restricted_argument.py | 31 | 8 | assert_* | test_restricted_argument_name | # -*- coding: utf-8 -*-
from contextlib import suppress
import pytest
from wemake_python_styleguide.constants import SPECIAL_ARGUMENT_NAMES_WHITELIST
from wemake_python_styleguide.violations.naming import (
ReservedArgumentNameViolation,
)
from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor... | [ReservedArgumentNameViolation]) | added | 884a0755984ee091acbdae2b784e9aa0ba75e8771ce8310e160c12734feeab92 | assert_*|test_restricted_argument_name|# -*- coding: utf-8 -*- from contextlib import suppress import pytest from wemake_python_styleguide.constants import SPECIAL_ARGUMENT_NAMES_WHITELIST from wemake_python_styleguide.violations.naming import ( ReservedArgumentNameViolation, ) from wemake_python_styleguide.visitors.as... | null | null | null |
wemake-services/wemake-python-styleguide | train | 100 | 46052ce0745ae48716f76356982516f30e78d18d | train | tests/test_visitors/test_ast/test_naming/test_naming_rules/test_restricted_argument.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_naming_rules/test_restricted_argument.py | 32 | 8 | assert_* | test_restricted_argument_name | # -*- coding: utf-8 -*-
from contextlib import suppress
import pytest
from wemake_python_styleguide.constants import SPECIAL_ARGUMENT_NAMES_WHITELIST
from wemake_python_styleguide.violations.naming import (
ReservedArgumentNameViolation,
)
from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor... | argument) | added | 5c2859107bc62036fd8e7f522bfc5fc78a1044599f8adf6454739cc321b729df | assert_*|test_restricted_argument_name|# -*- coding: utf-8 -*- from contextlib import suppress import pytest from wemake_python_styleguide.constants import SPECIAL_ARGUMENT_NAMES_WHITELIST from wemake_python_styleguide.violations.naming import ( ReservedArgumentNameViolation, ) from wemake_python_styleguide.visitors.as... | null | null | null |
wemake-services/wemake-python-styleguide | train | 101 | 02a454e7ea31bfad265733fe4b721b6b0b402e50 | train | tests/test_visitors/test_ast/test_complexity/test_counts/test_decorators.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_decorators.py | 84 | 4 | assert_* | test_decorators_incorrect | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.complexity.counts import (
ModuleMembersVisitor,
TooManyDecoratorsViolation,
)
function_with_decorators = """
@first
@second(param=4)
@third()
def function(): ...
"""
class_with_decorators = """
@first
@second(param=4)
@third()... | [TooManyDecoratorsViolation]) | added | b2cb3683cc6feb0916266f1b502c776c57ffe9cd981e95ca70c7adf861e6e1fe | assert_*|test_decorators_incorrect|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.counts import ( ModuleMembersVisitor, TooManyDecoratorsViolation, ) function_with_decorators = """ @first @second(param=4) @third() def function(): ... """ class_with_decorators = """ @first @s... | null | null | null |
wemake-services/wemake-python-styleguide | train | 102 | 612601293a498ea1d0d85f2a8965f848f315e10b | train | tests/test_violations/test_definition_order.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_definition_order.py | 22 | 8 | assert | test_violation_source_order | # -*- coding: utf-8 -*-
import inspect
import re
def _get_sorted_classes(classes):
sorted_by_code = sorted(classes, key=lambda cl: cl.code)
sorted_by_source = sorted(
classes,
key=lambda cl: inspect.findsource(cl)[1],
)
return sorted_by_code, sorted_by_source
def test_violation_sou... | sorted_by_source | added | 01693f2646ee326d7d86c04ec24d033a17262e2f8f7d7e1868b650aa99e48512 | assert|test_violation_source_order|# -*- coding: utf-8 -*- import inspect import re def _get_sorted_classes(classes): sorted_by_code = sorted(classes, key=lambda cl: cl.code) sorted_by_source = sorted( classes, key=lambda cl: inspect.findsource(cl)[1], ) return sorted_by_code, sorted_by_source def test_violation_source... | null | null | null |
wemake-services/wemake-python-styleguide | train | 102 | 612601293a498ea1d0d85f2a8965f848f315e10b | train | tests/test_violations/test_definition_order.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_definition_order.py | 33 | 8 | assert | test_violation_autoclass_order | # -*- coding: utf-8 -*-
import inspect
import re
def _get_sorted_classes(classes):
sorted_by_code = sorted(classes, key=lambda cl: cl.code)
sorted_by_source = sorted(
classes,
key=lambda cl: inspect.findsource(cl)[1],
)
return sorted_by_code, sorted_by_source
def test_violation_sou... | sorted_by_autoclass | added | ffb8522edf831635d3f5b33dc685ce3558b0af8d995e6bc45db9ac71038089e8 | assert|test_violation_autoclass_order|# -*- coding: utf-8 -*- import inspect import re def _get_sorted_classes(classes): sorted_by_code = sorted(classes, key=lambda cl: cl.code) sorted_by_source = sorted( classes, key=lambda cl: inspect.findsource(cl)[1], ) return sorted_by_code, sorted_by_source def test_violation_sou... | null | null | null |
wemake-services/wemake-python-styleguide | train | 103 | 0efc5f596b492d636652ffc2c97776d89ea5ac65 | train | tests/test_visitors/test_ast/test_naming/test_variable_usages.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_variable_usages.py | 136 | 4 | assert_* | test_anonymous_variable_use_wrong | # -*- coding: utf-8 -*-
import string
import pytest
from wemake_python_styleguide.violations.naming import (
AnonymousVariableUseViolation,
)
from wemake_python_styleguide.visitors.ast.naming import (
VARIABLE_NAMES_BLACKLIST,
WrongNameVisitor,
WrongVariableUseVisitor,
)
import_name = 'import {0}'
f... | [AnonymousVariableUseViolation]) | added | 573640490db1a734430b723e33ae89ab0845da9d7b96736ffdf8e9c27804ede6 | assert_*|test_anonymous_variable_use_wrong|# -*- coding: utf-8 -*- import string import pytest from wemake_python_styleguide.violations.naming import ( AnonymousVariableUseViolation, ) from wemake_python_styleguide.visitors.ast.naming import ( VARIABLE_NAMES_BLACKLIST, WrongNameVisitor, WrongVariableUseVisitor, ) impor... | null | null | null |
wemake-services/wemake-python-styleguide | train | 105 | 8eb6924c66ffbd9d862f484866fdea2836a93035 | train | tests/test_visitors/test_ast/test_complexity/test_offset_visitor.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_offset_visitor.py | 145 | 4 | assert_* | test_nested_offset_errors | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.complexity.offset import (
OffsetVisitor,
TooDeepNestingViolation,
)
nested_if = """
def container():
if True:
x = 1
"""
nested_if2 = """
def container():
if some_value:
call_other()
"""
nested_for = ""... | errors) | added | 2d4d2b70aa9a8a51a9f716b9c0ce4380e86b0288d0f5e17ac29d94c0d5e60be4 | assert_*|test_nested_offset_errors|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.offset import ( OffsetVisitor, TooDeepNestingViolation, ) nested_if = """ def container(): if True: x = 1 """ nested_if2 = """ def container(): if some_value: call_other() """ nested_for = """ ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 105 | 8eb6924c66ffbd9d862f484866fdea2836a93035 | train | tests/test_visitors/test_ast/test_complexity/test_offset_visitor.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_offset_visitor.py | 171 | 4 | assert_* | test_nested_offset_error_text | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.complexity.offset import (
OffsetVisitor,
TooDeepNestingViolation,
)
nested_if = """
def container():
if True:
x = 1
"""
nested_if2 = """
def container():
if some_value:
call_other()
"""
nested_for = ""... | [TooDeepNestingViolation]) | added | 83fcd479403cdf6f36d60428bf91f30f0c46809428f5c9ce20d77c8f949ebdbf | assert_*|test_nested_offset_error_text|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.offset import ( OffsetVisitor, TooDeepNestingViolation, ) nested_if = """ def container(): if True: x = 1 """ nested_if2 = """ def container(): if some_value: call_other() """ nested_for = ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 105 | 8eb6924c66ffbd9d862f484866fdea2836a93035 | train | tests/test_visitors/test_ast/test_complexity/test_offset_visitor.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_offset_visitor.py | 188 | 4 | assert_* | test_real_nesting_config | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.complexity.offset import (
OffsetVisitor,
TooDeepNestingViolation,
)
nested_if = """
def container():
if True:
x = 1
"""
nested_if2 = """
def container():
if some_value:
call_other()
"""
nested_for = ""... | [TooDeepNestingViolation]) | added | 250804af870c7bc12396c4fe9044d65c27ee284d88fbbd884940f1c69bb201bb | assert_*|test_real_nesting_config|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.offset import ( OffsetVisitor, TooDeepNestingViolation, ) nested_if = """ def container(): if True: x = 1 """ nested_if2 = """ def container(): if some_value: call_other() """ nested_for = """ d... | null | null | null |
wemake-services/wemake-python-styleguide | train | 106 | 7ea14a194f46908c49180f81e56bcea923d324ae | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 133 | 0 | assert | """
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name = u'Nikita Sobolev' # noq... | octal_number | modified | c478cab32cc086f24461af5916cb18cf7beda0102543b96ec6b002eadbd43345 | assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u'Nikita Sobolev' # noqa:... | octal_number | 132 | 0 | |
wemake-services/wemake-python-styleguide | train | 106 | 7ea14a194f46908c49180f81e56bcea923d324ae | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 143 | 0 | assert | """
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name = u'Nikita Sobolev' # noq... | hex_number | modified | 8d9b87d80cd9abd5e0427839453763cef7aabe2731fc815aae1a0a33fd4397e9 | assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u'Nikita Sobolev' # noqa:... | hex_number | 142 | 0 | |
wemake-services/wemake-python-styleguide | train | 106 | 7ea14a194f46908c49180f81e56bcea923d324ae | train | tests/test_visitors/test_ast/test_keywords/test_loops/test_loop_with_else.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_loops/test_loop_with_else.py | 141 | 4 | assert_* | test_wrong_else_in_for_loop | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
RedundantLoopElseViolation,
)
from wemake_python_styleguide.visitors.ast.keywords import WrongLoopVisitor
wrong_else_in_for_loop = """
for x in '123':
...
else:
...
"""
wrong_nested_else_in_for_loop = ... | [RedundantLoopElseViolation]) | added | 7b6d00a698940c962191517beb4f1bb85be585b9ddd1d04d4122ee1f22b5a5a0 | assert_*|test_wrong_else_in_for_loop|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( RedundantLoopElseViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongLoopVisitor wrong_else_in_for_loop = """ for x in '123': ... else: ... """ wrong_neste... | null | null | null |
wemake-services/wemake-python-styleguide | train | 106 | 7ea14a194f46908c49180f81e56bcea923d324ae | train | tests/test_visitors/test_ast/test_statements/test_unreachable_code.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_unreachable_code.py | 247 | 4 | assert_* | test_unreachable_code_raise | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
UnreachableCodeViolation,
)
from wemake_python_styleguide.visitors.ast.statements import (
StatementsWithBodiesVisitor,
)
# Modules:
module_template = """
{0}
{1}
"""
# Simple conditions:
if_template = "... | [UnreachableCodeViolation]) | added | ed330a99a1fa7432d0c6b4288f7f345b4f97f5249a70e5d34a3f37e3dd43e0d6 | assert_*|test_unreachable_code_raise|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( UnreachableCodeViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} {1} """ # Simple cond... | null | null | null |
wemake-services/wemake-python-styleguide | train | 106 | 7ea14a194f46908c49180f81e56bcea923d324ae | train | tests/test_visitors/test_ast/test_statements/test_unreachable_code.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_unreachable_code.py | 266 | 4 | assert_* | test_unreachable_code_return | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
UnreachableCodeViolation,
)
from wemake_python_styleguide.visitors.ast.statements import (
StatementsWithBodiesVisitor,
)
# Modules:
module_template = """
{0}
{1}
"""
# Simple conditions:
if_template = "... | [UnreachableCodeViolation]) | added | d3b8118a7df3b9ee21831c2f454c39b6821616f73505c7caf7641cf692af4c8a | assert_*|test_unreachable_code_return|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( UnreachableCodeViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} {1} """ # Simple con... | null | null | null |
wemake-services/wemake-python-styleguide | train | 106 | 7ea14a194f46908c49180f81e56bcea923d324ae | train | tests/test_visitors/test_ast/test_statements/test_unreachable_code.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_unreachable_code.py | 292 | 4 | assert_* | test_unreachable_code_in_loops | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
UnreachableCodeViolation,
)
from wemake_python_styleguide.visitors.ast.statements import (
StatementsWithBodiesVisitor,
)
# Modules:
module_template = """
{0}
{1}
"""
# Simple conditions:
if_template = "... | [UnreachableCodeViolation]) | added | fdf919e3021ae536789d271bf66dbe7dbcb4ebce770435c834f55b0a56f7842a | assert_*|test_unreachable_code_in_loops|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( UnreachableCodeViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} {1} """ # Simple c... | null | null | null |
wemake-services/wemake-python-styleguide | train | 107 | cd73fc0b77cc8e09e178b8dce991d27439e356a0 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 134 | 0 | assert | """
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name = u'Nikita Sobolev' # noq... | octal_number | added | a029b63824fea4aedde6034f6f0df751002806a5c19589be08e53a2efd1bf386 | assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u'Nikita Sobolev' # noqa:... | null | null | null | |
wemake-services/wemake-python-styleguide | train | 107 | cd73fc0b77cc8e09e178b8dce991d27439e356a0 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 144 | 0 | assert | """
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name = u'Nikita Sobolev' # noq... | hex_number | added | 2a522e61a2e37ed59250a0180dc4f31611de9fe8d12c348fa461cfdfc97771c4 | assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u'Nikita Sobolev' # noqa:... | null | null | null | |
wemake-services/wemake-python-styleguide | train | 107 | cd73fc0b77cc8e09e178b8dce991d27439e356a0 | train | tests/test_visitors/test_ast/test_statements/test_statements_with_no_effect.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_statements_with_no_effect.py | 194 | 4 | assert_* | test_statement_with_no_effect | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
StatementHasNoEffectViolation,
)
from wemake_python_styleguide.visitors.ast.statements import (
StatementsWithBodiesVisitor,
)
# Modules:
module_template = """
{0}
"""
# Simple conditions:
if_template = ... | [StatementHasNoEffectViolation]) | added | 375a1f64becae118246f27662e5035d206b97db4b341e5ce8c3d9a437327385d | assert_*|test_statement_with_no_effect|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( StatementHasNoEffectViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} """ # Simple c... | null | null | null |
wemake-services/wemake-python-styleguide | train | 107 | cd73fc0b77cc8e09e178b8dce991d27439e356a0 | train | tests/test_visitors/test_ast/test_statements/test_statements_with_no_effect.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_statements_with_no_effect.py | 356 | 4 | assert_* | test_statement_with_useless_docstring | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
StatementHasNoEffectViolation,
)
from wemake_python_styleguide.visitors.ast.statements import (
StatementsWithBodiesVisitor,
)
# Modules:
module_template = """
{0}
"""
# Simple conditions:
if_template = ... | [StatementHasNoEffectViolation]) | added | 04379f990fbd7bf476f614dd05b678133af9fc60ee5fe1aa9e2b4984908b87c7 | assert_*|test_statement_with_useless_docstring|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( StatementHasNoEffectViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} """ # ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 107 | cd73fc0b77cc8e09e178b8dce991d27439e356a0 | train | tests/test_visitors/test_ast/test_statements/test_unreachable_code.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_unreachable_code.py | 247 | 4 | assert_* | test_unreachable_code_raise | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
UnreachableCodeViolation,
)
from wemake_python_styleguide.visitors.ast.statements import (
StatementsWithBodiesVisitor,
)
# Modules:
module_template = """
{0}
{1}
"""
# Simple conditions:
if_template = "... | [UnreachableCodeViolation]) | modified | 52f6eeb898f0ad3830c70b392be01e6ea41705a311755887b4b78d0dcfd571ea | assert_*|test_unreachable_code_raise|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( UnreachableCodeViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} {1} """ # Simple cond... | [UnreachableCodeViolation]) | 247 | 4 |
wemake-services/wemake-python-styleguide | train | 107 | cd73fc0b77cc8e09e178b8dce991d27439e356a0 | train | tests/test_visitors/test_ast/test_statements/test_unreachable_code.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_unreachable_code.py | 266 | 4 | assert_* | test_unreachable_code_return | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
UnreachableCodeViolation,
)
from wemake_python_styleguide.visitors.ast.statements import (
StatementsWithBodiesVisitor,
)
# Modules:
module_template = """
{0}
{1}
"""
# Simple conditions:
if_template = "... | [UnreachableCodeViolation]) | modified | 7a492689aa014d74aec105b6e825855b82f4c8bc22d3e39df8f2bd44b5760134 | assert_*|test_unreachable_code_return|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( UnreachableCodeViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} {1} """ # Simple con... | [UnreachableCodeViolation]) | 266 | 4 |
wemake-services/wemake-python-styleguide | train | 107 | cd73fc0b77cc8e09e178b8dce991d27439e356a0 | train | tests/test_visitors/test_ast/test_statements/test_unreachable_code.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_unreachable_code.py | 292 | 4 | assert_* | test_unreachable_code_in_loops | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
UnreachableCodeViolation,
)
from wemake_python_styleguide.visitors.ast.statements import (
StatementsWithBodiesVisitor,
)
# Modules:
module_template = """
{0}
{1}
"""
# Simple conditions:
if_template = "... | [UnreachableCodeViolation]) | modified | c4da180b4d3862939604791c2b982a96609985fdd3c1d4b5fb8159818a544d71 | assert_*|test_unreachable_code_in_loops|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( UnreachableCodeViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} {1} """ # Simple c... | [UnreachableCodeViolation]) | 292 | 4 |
wemake-services/wemake-python-styleguide | train | 108 | 22ea20cb0a2faf4129427eea5c86193e583cce4d | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 135 | 0 | assert | """
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name = u'Nikita Sobolev' # noq... | octal_number | modified | 8c2a14693adfc94932d4501d493bd9d6170a64294d4be6f2b9b6f9a6691d3a7d | assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u'Nikita Sobolev' # noqa:... | octal_number | 134 | 0 | |
wemake-services/wemake-python-styleguide | train | 108 | 22ea20cb0a2faf4129427eea5c86193e583cce4d | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 145 | 0 | assert | """
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name = u'Nikita Sobolev' # noq... | hex_number | modified | 4e16d2cbe217bebb70b8ebf215131bf53cf2bfcf54979d6cee8ee97042448194 | assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u'Nikita Sobolev' # noqa:... | hex_number | 144 | 0 | |
wemake-services/wemake-python-styleguide | train | 108 | 22ea20cb0a2faf4129427eea5c86193e583cce4d | train | tests/test_checker/test_module_names.py | train | wemake-services/wemake-python-styleguide:tests/test_checker/test_module_names.py | 30 | 4 | assert | test_module_names | # -*- coding: utf-8 -*-
import ast
import pytest
from wemake_python_styleguide.checker import Checker
from wemake_python_styleguide.violations import naming
@pytest.mark.parametrize('filename, error', [
('__magic__.py', naming.WrongModuleMagicNameViolation),
('util.py', naming.WrongModuleNameViolation),
... | error.code | modified | 620605fd05843a78dd9979a5c34b4898e168eb38415477b3fb164080d63c1a8b | assert|test_module_names|# -*- coding: utf-8 -*- import ast import pytest from wemake_python_styleguide.checker import Checker from wemake_python_styleguide.violations import naming @pytest.mark.parametrize('filename, error', [ ('__magic__.py', naming.WrongModuleMagicNameViolation), ('util.py', naming.WrongModuleNameVi... | error.code | 28 | 4 |
wemake-services/wemake-python-styleguide | train | 108 | 22ea20cb0a2faf4129427eea5c86193e583cce4d | train | tests/test_visitors/test_ast/test_naming/test_naming.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_naming.py | 72 | 4 | assert_* | test_private_variable_name | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.constants import VARIABLE_NAMES_BLACKLIST
from wemake_python_styleguide.violations.naming import (
ConsecutiveUnderscoresInNameViolation,
PrivateNameViolation,
TooLongNameViolation,
TooShortNameViolation,
UnderscoredNumberNameViol... | private_name) | added | 95910a1c767aad01bd50dc0f1c39ee382cd8b11d99a5529e72c137c0fb4b178d | assert_*|test_private_variable_name|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.constants import VARIABLE_NAMES_BLACKLIST from wemake_python_styleguide.violations.naming import ( ConsecutiveUnderscoresInNameViolation, PrivateNameViolation, TooLongNameViolation, TooShortNameViolation, Underscored... | null | null | null |
wemake-services/wemake-python-styleguide | train | 108 | 22ea20cb0a2faf4129427eea5c86193e583cce4d | train | tests/test_visitors/test_ast/test_naming/test_naming.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_naming.py | 95 | 4 | assert_* | test_underscored_variable_name | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.constants import VARIABLE_NAMES_BLACKLIST
from wemake_python_styleguide.violations.naming import (
ConsecutiveUnderscoresInNameViolation,
PrivateNameViolation,
TooLongNameViolation,
TooShortNameViolation,
UnderscoredNumberNameViol... | [ConsecutiveUnderscoresInNameViolation]) | added | 722a568eb8f2a99d75222a2fb434d7e8908d633f96b3a28e15d361c0b7312e70 | assert_*|test_underscored_variable_name|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.constants import VARIABLE_NAMES_BLACKLIST from wemake_python_styleguide.violations.naming import ( ConsecutiveUnderscoresInNameViolation, PrivateNameViolation, TooLongNameViolation, TooShortNameViolation, Undersc... | null | null | null |
wemake-services/wemake-python-styleguide | train | 108 | 22ea20cb0a2faf4129427eea5c86193e583cce4d | train | tests/test_visitors/test_ast/test_naming/test_naming_rules/test_long.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_naming_rules/test_long.py | 22 | 4 | assert_* | test_long_variable_name | # -*- coding: utf-8 -*-
from wemake_python_styleguide.violations.naming import TooLongNameViolation
from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor
def test_long_variable_name(
assert_errors,
assert_error_text,
parse_ast_tree,
naming_template,
default_options,
mode,
... | [TooLongNameViolation]) | added | fec9cac7ddc2c43e64d09b3c895ee8d5d3c41f120a5fb76f8f74e16bd0856fb4 | assert_*|test_long_variable_name|# -*- coding: utf-8 -*- from wemake_python_styleguide.violations.naming import TooLongNameViolation from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor def test_long_variable_name( assert_errors, assert_error_text, parse_ast_tree, naming_template, default_options, ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 108 | 22ea20cb0a2faf4129427eea5c86193e583cce4d | train | tests/test_visitors/test_filenames/test_module/test_module_name_length.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_filenames/test_module/test_module_name_length.py | 26 | 4 | assert_* | test_too_short_filename | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.naming import (
TooLongNameViolation,
TooShortNameViolation,
WrongModuleNamePatternViolation,
)
from wemake_python_styleguide.visitors.filenames.module import (
WrongModuleNameVisitor,
)
@pytest.mark.parametrize('filename... | [ TooShortNameViolation, WrongModuleNamePatternViolation, ]) | modified | 41b17021a20abc1b74cbcd4de40861cc9192a92abe8b3bc7b097f8417cfeed44 | assert_*|test_too_short_filename|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import ( TooLongNameViolation, TooShortNameViolation, WrongModuleNamePatternViolation, ) from wemake_python_styleguide.visitors.filenames.module import ( WrongModuleNameVisitor, ) @pytest.mark.parametr... | [ TooShortNameViolation, WrongModuleNamePatternViolation, ]) | 25 | 4 |
wemake-services/wemake-python-styleguide | train | 108 | 22ea20cb0a2faf4129427eea5c86193e583cce4d | train | tests/test_visitors/test_filenames/test_module/test_module_name_length.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_filenames/test_module/test_module_name_length.py | 39 | 4 | assert_* | test_length_option | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.naming import (
TooLongNameViolation,
TooShortNameViolation,
WrongModuleNamePatternViolation,
)
from wemake_python_styleguide.visitors.filenames.module import (
WrongModuleNameVisitor,
)
@pytest.mark.parametrize('filename... | [TooShortNameViolation]) | modified | 0e5986ba8ab2d2d3ceec454834029ce4c9a21cd304209b32b4920cd623a740d5 | assert_*|test_length_option|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import ( TooLongNameViolation, TooShortNameViolation, WrongModuleNamePatternViolation, ) from wemake_python_styleguide.visitors.filenames.module import ( WrongModuleNameVisitor, ) @pytest.mark.parametrize('... | [TooShortNameViolation]) | 38 | 4 |
wemake-services/wemake-python-styleguide | train | 109 | edf198bdcd183f9a3d491af1337e4942da0ffa1d | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 136 | 0 | assert | """
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name = u'Nikita Sobolev' # noq... | octal_number | modified | 0edde9530990d7bf1cfbf559af2d46ab217cb72c4733de3eabe74d2d9729cac4 | assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u'Nikita Sobolev' # noqa:... | octal_number | 135 | 0 | |
wemake-services/wemake-python-styleguide | train | 109 | edf198bdcd183f9a3d491af1337e4942da0ffa1d | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 146 | 0 | assert | """
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name = u'Nikita Sobolev' # noq... | hex_number | modified | fb3b5292e95f3d462eb7cffacceedd28dbd7be5f02bf411fc71690652579c8bf | assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u'Nikita Sobolev' # noqa:... | hex_number | 145 | 0 | |
wemake-services/wemake-python-styleguide | train | 109 | edf198bdcd183f9a3d491af1337e4942da0ffa1d | train | tests/test_visitors/test_ast/test_naming/test_naming_rules/test_long.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_naming_rules/test_long.py | 22 | 4 | assert_* | test_long_variable_name | # -*- coding: utf-8 -*-
from wemake_python_styleguide.violations.naming import TooLongNameViolation
from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor
def test_long_variable_name(
assert_errors,
assert_error_text,
parse_ast_tree,
naming_template,
default_options,
mode,
... | [TooLongNameViolation]) | modified | 7d4a75cef14c070c27750840e68ef2bce2ce32311d50d0197a64c55c1eeb1008 | assert_*|test_long_variable_name|# -*- coding: utf-8 -*- from wemake_python_styleguide.violations.naming import TooLongNameViolation from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor def test_long_variable_name( assert_errors, assert_error_text, parse_ast_tree, naming_template, default_options, ... | [TooLongNameViolation]) | 22 | 4 |
wemake-services/wemake-python-styleguide | train | 109 | edf198bdcd183f9a3d491af1337e4942da0ffa1d | train | tests/test_visitors/test_ast/test_naming/test_naming_rules/test_long.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_naming_rules/test_long.py | 23 | 4 | assert_* | test_long_variable_name | # -*- coding: utf-8 -*-
from wemake_python_styleguide.violations.naming import TooLongNameViolation
from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor
def test_long_variable_name(
assert_errors,
assert_error_text,
parse_ast_tree,
naming_template,
default_options,
mode,
... | long_name) | modified | 2a2b05f70b7d3458aef5816f18487b20c72ebb617493119dbd270d8cdb2b86ed | assert_*|test_long_variable_name|# -*- coding: utf-8 -*- from wemake_python_styleguide.violations.naming import TooLongNameViolation from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor def test_long_variable_name( assert_errors, assert_error_text, parse_ast_tree, naming_template, default_options, ... | long_name) | 23 | 4 |
wemake-services/wemake-python-styleguide | train | 109 | edf198bdcd183f9a3d491af1337e4942da0ffa1d | train | tests/test_visitors/test_ast/test_naming/test_naming_rules/test_unicode.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_naming_rules/test_unicode.py | 31 | 4 | assert_* | test_wrong_unicode | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.naming import UnicodeNameViolation
from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor
@pytest.mark.parametrize('wrong_name', [
'тестовое_имя',
'test_имя',
'сос', # written with identical to ASCII russi... | [UnicodeNameViolation]) | added | 3dac773d5b876af6009511fc5b60334b47742cb6546eba805c9a7d162a3cda6c | assert_*|test_wrong_unicode|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import UnicodeNameViolation from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor @pytest.mark.parametrize('wrong_name', [ 'тестовое_имя', 'test_имя', 'сос', # written with identical to ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 109 | edf198bdcd183f9a3d491af1337e4942da0ffa1d | train | tests/test_visitors/test_ast/test_naming/test_naming_rules/test_unicode.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_naming_rules/test_unicode.py | 32 | 4 | assert_* | test_wrong_unicode | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.naming import UnicodeNameViolation
from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor
@pytest.mark.parametrize('wrong_name', [
'тестовое_имя',
'test_имя',
'сос', # written with identical to ASCII russi... | wrong_name) | added | 2f4c580b6484a190a0560e325036d277c26acd838a8c314b545bd88623697093 | assert_*|test_wrong_unicode|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import UnicodeNameViolation from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor @pytest.mark.parametrize('wrong_name', [ 'тестовое_имя', 'test_имя', 'сос', # written with identical to ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 110 | 889080f36448983aa6c9ba0d2456996e4a1ff8c2 | train | tests/test_checker/test_module_names.py | train | wemake-services/wemake-python-styleguide:tests/test_checker/test_module_names.py | 33 | 4 | assert | test_module_names | # -*- coding: utf-8 -*-
import ast
import pytest
from wemake_python_styleguide.checker import Checker
from wemake_python_styleguide.violations import naming
@pytest.mark.parametrize('filename, error', [
('__magic__.py', naming.WrongModuleMagicNameViolation),
('util.py', naming.WrongModuleNameViolation),
... | error.code | modified | 7c8e20167a7722d44f4a757394f901b4558b44c6bb916e0960bacbfd5ce70322 | assert|test_module_names|# -*- coding: utf-8 -*- import ast import pytest from wemake_python_styleguide.checker import Checker from wemake_python_styleguide.violations import naming @pytest.mark.parametrize('filename, error', [ ('__magic__.py', naming.WrongModuleMagicNameViolation), ('util.py', naming.WrongModuleNameVi... | error.code | 30 | 4 |
wemake-services/wemake-python-styleguide | train | 110 | 889080f36448983aa6c9ba0d2456996e4a1ff8c2 | train | tests/test_visitors/test_ast/test_complexity/test_counts/test_method_counts.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_method_counts.py | 125 | 4 | assert_* | test_method_counts_violation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.complexity.counts import (
MethodMembersVisitor,
TooManyMethodsViolation,
)
module_without_methods = """
def first(): ...
def second(): ...
"""
module_with_async_functions = """
async def first(): ...
async def second(): ...
... | [TooManyMethodsViolation]) | modified | dffe9e41f45d6778fb4fc01f37f8799fb08f678b7f03386936ee856c43b13407 | assert_*|test_method_counts_violation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.counts import ( MethodMembersVisitor, TooManyMethodsViolation, ) module_without_methods = """ def first(): ... def second(): ... """ module_with_async_functions = """ async def first(): ... ... | [TooManyMethodsViolation]) | 125 | 4 |
wemake-services/wemake-python-styleguide | train | 110 | 889080f36448983aa6c9ba0d2456996e4a1ff8c2 | train | tests/test_visitors/test_ast/test_complexity/test_counts/test_module_counts.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_module_counts.py | 148 | 4 | assert_* | test_module_counts_violation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.complexity.counts import (
ModuleMembersVisitor,
TooManyModuleMembersViolation,
)
# Multiple module members:
module_with_function_and_class = """
def first(): ...
class Second(object): ...
"""
module_with_function_and_class_a... | [TooManyModuleMembersViolation]) | modified | faba8f1b8c4ed558800c001bb2a6ad993d2f9ba8f02fe57d02920876d1d99c38 | assert_*|test_module_counts_violation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.counts import ( ModuleMembersVisitor, TooManyModuleMembersViolation, ) # Multiple module members: module_with_function_and_class = """ def first(): ... class Second(object): ... """ module_w... | [TooManyModuleMembersViolation]) | 148 | 4 |
wemake-services/wemake-python-styleguide | train | 110 | 889080f36448983aa6c9ba0d2456996e4a1ff8c2 | train | tests/test_visitors/test_ast/test_keywords/test_comprehensions/test_for_count.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_comprehensions/test_for_count.py | 115 | 4 | assert_* | test_multiple_fors_in_async_comprehension | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.keywords import (
TooManyForsInComprehensionViolation,
WrongComprehensionVisitor,
)
regular_loop_comprehension = """
nodes = [
target
for assignment in top_level_assigns
for target in assignment.targets
]
"""
comple... | [TooManyForsInComprehensionViolation]) | added | 010dd28970915953f0e54b2d4f64924b7271d0765607b38c832ea533de29e53b | assert_*|test_multiple_fors_in_async_comprehension|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.keywords import ( TooManyForsInComprehensionViolation, WrongComprehensionVisitor, ) regular_loop_comprehension = """ nodes = [ target for assignment in top_level_assigns for target in assi... | null | null | null |
wemake-services/wemake-python-styleguide | train | 110 | 889080f36448983aa6c9ba0d2456996e4a1ff8c2 | train | tests/test_visitors/test_ast/test_naming/test_naming_rules/test_short.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_naming_rules/test_short.py | 24 | 4 | assert_* | test_short_variable_name | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.naming import TooShortNameViolation
from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor
def test_short_variable_name(
assert_errors,
assert_error_text,
parse_ast_tree,
naming_template,
default_op... | [TooShortNameViolation]) | modified | 7a1a657a40698a2c4f9bde0811bd1bf0f310bec4173b2220672a59322f605818 | assert_*|test_short_variable_name|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import TooShortNameViolation from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor def test_short_variable_name( assert_errors, assert_error_text, parse_ast_tree, naming_template, ... | [TooShortNameViolation]) | 22 | 4 |
wemake-services/wemake-python-styleguide | train | 110 | 889080f36448983aa6c9ba0d2456996e4a1ff8c2 | train | tests/test_visitors/test_ast/test_naming/test_naming_rules/test_short.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_naming/test_naming_rules/test_short.py | 25 | 4 | assert_* | test_short_variable_name | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.naming import TooShortNameViolation
from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor
def test_short_variable_name(
assert_errors,
assert_error_text,
parse_ast_tree,
naming_template,
default_op... | short_name) | modified | 8dce6e0705471c7334c0ade7397dd212ba6f018cff0bed70019da22146c171fe | assert_*|test_short_variable_name|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import TooShortNameViolation from wemake_python_styleguide.visitors.ast.naming import WrongNameVisitor def test_short_variable_name( assert_errors, assert_error_text, parse_ast_tree, naming_template, ... | short_name) | 23 | 4 |
wemake-services/wemake-python-styleguide | train | 111 | b0c5ddc38346c78208875334aa786d2c659f3775 | train | tests/test_version.py | train | wemake-services/wemake-python-styleguide:tests/test_version.py | 17 | 4 | assert | test_call_flake8_version | # -*- coding: utf-8 -*-
import subprocess
from wemake_python_styleguide.version import pkg_name, pkg_version
def test_call_flake8_version():
"""Checks that module is registered and visible in the meta data."""
output = subprocess.check_output(
['flake8', '--version'],
stderr=subprocess.STDOU... | output_text | modified | 6f152fd19a1ccd0cdc4f9a979c6ba4a868cd8ae9a24f5b9ddda9ca6591f92cf8 | assert|test_call_flake8_version|# -*- coding: utf-8 -*- import subprocess from wemake_python_styleguide.version import pkg_name, pkg_version def test_call_flake8_version(): """Checks that module is registered and visible in the meta data.""" output = subprocess.check_output( ['flake8', '--version'], stderr=subprocess.S... | output_text | 16 | 4 |
wemake-services/wemake-python-styleguide | train | 111 | b0c5ddc38346c78208875334aa786d2c659f3775 | train | tests/test_version.py | train | wemake-services/wemake-python-styleguide:tests/test_version.py | 18 | 4 | assert | test_call_flake8_version | # -*- coding: utf-8 -*-
import subprocess
from wemake_python_styleguide.version import pkg_name, pkg_version
def test_call_flake8_version():
"""Checks that module is registered and visible in the meta data."""
output = subprocess.check_output(
['flake8', '--version'],
stderr=subprocess.STDOU... | output_text | modified | df51981f1e1f26da041f40f8a2b9f3f1b15ce2dc47bdddeb2252aeed8c42591c | assert|test_call_flake8_version|# -*- coding: utf-8 -*- import subprocess from wemake_python_styleguide.version import pkg_name, pkg_version def test_call_flake8_version(): """Checks that module is registered and visible in the meta data.""" output = subprocess.check_output( ['flake8', '--version'], stderr=subprocess.S... | output_text | 17 | 4 |
wemake-services/wemake-python-styleguide | train | 112 | 06decf42c6c9c48f7f3db721301fa5c106061a64 | train | tests/test_version.py | train | wemake-services/wemake-python-styleguide:tests/test_version.py | 17 | 4 | assert | test_call_flake8_version | # -*- coding: utf-8 -*-
import subprocess
from wemake_python_styleguide.version import pkg_name, pkg_version
def test_call_flake8_version():
"""Checks that module is registered and visible in the meta data."""
output_text = subprocess.check_output(
['flake8', '--version'],
stderr=subprocess.... | output_text | added | 9f172203838e983f5b4bbf7ab65d46861e1069add2ea11c868f0d8fe3544789b | assert|test_call_flake8_version|# -*- coding: utf-8 -*- import subprocess from wemake_python_styleguide.version import pkg_name, pkg_version def test_call_flake8_version(): """Checks that module is registered and visible in the meta data.""" output_text = subprocess.check_output( ['flake8', '--version'], stderr=subproc... | null | null | null |
wemake-services/wemake-python-styleguide | train | 112 | 06decf42c6c9c48f7f3db721301fa5c106061a64 | train | tests/test_version.py | train | wemake-services/wemake-python-styleguide:tests/test_version.py | 18 | 4 | assert | test_call_flake8_version | # -*- coding: utf-8 -*-
import subprocess
from wemake_python_styleguide.version import pkg_name, pkg_version
def test_call_flake8_version():
"""Checks that module is registered and visible in the meta data."""
output_text = subprocess.check_output(
['flake8', '--version'],
stderr=subprocess.... | output_text | added | 771614fa415644211d7d79a45cb45c950ba545d1b0b4cb3699702c918ded9f84 | assert|test_call_flake8_version|# -*- coding: utf-8 -*- import subprocess from wemake_python_styleguide.version import pkg_name, pkg_version def test_call_flake8_version(): """Checks that module is registered and visible in the meta data.""" output_text = subprocess.check_output( ['flake8', '--version'], stderr=subproc... | null | null | null |
wemake-services/wemake-python-styleguide | train | 113 | a7c959f42020971eaf9f9235d7cce8412ab2f90f | train | tests/test_visitors/test_ast/test_complexity/test_counts/test_context_manager_targets.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_context_manager_targets.py | 44 | 4 | assert_* | test_context_manager_multiple_targets | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
TooManyContextManagerAssignmentsViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.counts import (
ContextManagerVisitor,
)
incorrect_count = """
with open('') as first, second:
...
"""
co... | [TooManyContextManagerAssignmentsViolation]) | added | 2b891590007e2b0d04117ea3d67a6fef80c1441101024526e4da14055475581d | assert_*|test_context_manager_multiple_targets|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( TooManyContextManagerAssignmentsViolation, ) from wemake_python_styleguide.visitors.ast.complexity.counts import ( ContextManagerVisitor, ) incorrect_count = """ with open('... | null | null | null |
wemake-services/wemake-python-styleguide | train | 114 | 60cbab0b2f4eded1654cacc5b5f000fee32a4bfa | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 146 | 0 | assert | """
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name = u'Nikita Sobolev' # noq... | octal_number | modified | d530bae0ca50632a15483949e5d853ff092066092105ac67bc6b21d757549e10 | assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u'Nikita Sobolev' # noqa:... | hex_number | 146 | 0 | |
wemake-services/wemake-python-styleguide | train | 114 | 60cbab0b2f4eded1654cacc5b5f000fee32a4bfa | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 156 | 0 | assert | """
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name = u'Nikita Sobolev' # noq... | hex_number | added | bff0e41dd331c912dd8a518d4690af1451345e44fa19cacd20774c73e07b2617 | assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u'Nikita Sobolev' # noqa:... | null | null | null | |
wemake-services/wemake-python-styleguide | train | 114 | 60cbab0b2f4eded1654cacc5b5f000fee32a4bfa | train | tests/test_visitors/test_ast/test_complexity/test_counts/test_method_counts.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_method_counts.py | 147 | 4 | assert_* | test_method_counts_violation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.complexity.counts import (
MethodMembersVisitor,
TooManyMethodsViolation,
)
module_without_methods = """
def first(): ...
def second(): ...
"""
module_with_async_functions = """
async def first(): ...
async def second(): ...
... | [TooManyMethodsViolation]) | added | 5105036a8509b4633f64f3229b18276ab5cc1257c6a3bcf2b917dd927ca9ec07 | assert_*|test_method_counts_violation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.counts import ( MethodMembersVisitor, TooManyMethodsViolation, ) module_without_methods = """ def first(): ... def second(): ... """ module_with_async_functions = """ async def first(): ... ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 114 | 60cbab0b2f4eded1654cacc5b5f000fee32a4bfa | train | tests/test_visitors/test_ast/test_complexity/test_counts/test_module_counts.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_counts/test_module_counts.py | 160 | 4 | assert_* | test_module_counts_violation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.complexity.counts import (
ModuleMembersVisitor,
TooManyModuleMembersViolation,
)
# Multiple module members:
module_with_function_and_class = """
def first(): ...
class Second(object): ...
"""
module_with_function_and_class_a... | [TooManyModuleMembersViolation]) | added | 88545452adb3e057970f3e51c022eea7246a1e0a783236e69fbd33e062c0b9c3 | assert_*|test_module_counts_violation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.counts import ( ModuleMembersVisitor, TooManyModuleMembersViolation, ) # Multiple module members: module_with_function_and_class = """ def first(): ... class Second(object): ... """ module_w... | null | null | null |
wemake-services/wemake-python-styleguide | train | 114 | 60cbab0b2f4eded1654cacc5b5f000fee32a4bfa | train | tests/test_visitors/test_ast/test_complexity/test_offset_visitor.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_offset_visitor.py | 144 | 4 | assert_* | test_nested_offset_errors | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.complexity.offset import (
OffsetVisitor,
TooDeepNestingViolation,
)
nested_if = """
def container():
if True:
x = 1
"""
nested_if2 = """
def container():
if some_value:
call_other()
"""
nested_for = ""... | errors) | modified | dbc0e2b286928d1809d933d5eff78bcdfc9936d6f5b81bccffdd42f2cd6db634 | assert_*|test_nested_offset_errors|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.offset import ( OffsetVisitor, TooDeepNestingViolation, ) nested_if = """ def container(): if True: x = 1 """ nested_if2 = """ def container(): if some_value: call_other() """ nested_for = """ ... | errors) | 145 | 4 |
wemake-services/wemake-python-styleguide | train | 114 | 60cbab0b2f4eded1654cacc5b5f000fee32a4bfa | train | tests/test_visitors/test_ast/test_complexity/test_offset_visitor.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_offset_visitor.py | 170 | 4 | assert_* | test_nested_offset_error_text | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.complexity.offset import (
OffsetVisitor,
TooDeepNestingViolation,
)
nested_if = """
def container():
if True:
x = 1
"""
nested_if2 = """
def container():
if some_value:
call_other()
"""
nested_for = ""... | [TooDeepNestingViolation]) | modified | ab067cd681d69dcad743882206c788e6d9f59ba7770f269d4c44b74da2e982d5 | assert_*|test_nested_offset_error_text|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.offset import ( OffsetVisitor, TooDeepNestingViolation, ) nested_if = """ def container(): if True: x = 1 """ nested_if2 = """ def container(): if some_value: call_other() """ nested_for = ... | [TooDeepNestingViolation]) | 171 | 4 |
wemake-services/wemake-python-styleguide | train | 114 | 60cbab0b2f4eded1654cacc5b5f000fee32a4bfa | train | tests/test_visitors/test_ast/test_complexity/test_offset_visitor.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_offset_visitor.py | 187 | 4 | assert_* | test_real_nesting_config | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.complexity.offset import (
OffsetVisitor,
TooDeepNestingViolation,
)
nested_if = """
def container():
if True:
x = 1
"""
nested_if2 = """
def container():
if some_value:
call_other()
"""
nested_for = ""... | [TooDeepNestingViolation]) | modified | 8dbff17e654d2b5051e60e0fa9386ba884496efd00fce03a45d2094d1b286c35 | assert_*|test_real_nesting_config|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.complexity.offset import ( OffsetVisitor, TooDeepNestingViolation, ) nested_if = """ def container(): if True: x = 1 """ nested_if2 = """ def container(): if some_value: call_other() """ nested_for = """ d... | [TooDeepNestingViolation]) | 188 | 4 |
wemake-services/wemake-python-styleguide | train | 114 | 60cbab0b2f4eded1654cacc5b5f000fee32a4bfa | train | tests/test_visitors/test_decorators/test_alias_decorator.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_decorators/test_alias_decorator.py | 10 | 9 | pytest.raises | test_raises_for_duplicates | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.decorators import alias
def test_raises_for_duplicates():
"""Ensures that decorator raises an exception for duplicates."""
with pytest.raises( | ValueError) | added | 5be8e89ded2a79270407e7e67e608578e7c917bb0d38442588bea002b8bea7eb | pytest.raises|test_raises_for_duplicates|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.decorators import alias def test_raises_for_duplicates(): """Ensures that decorator raises an exception for duplicates.""" with pytest.raises( | null | null | null |
wemake-services/wemake-python-styleguide | train | 115 | 7bf1435c19f7ee11fd8c112fc992bb37138ba9be | train | tests/test_visitors/test_ast/test_keywords/test_context_manager_targets.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_context_manager_targets.py | 54 | 4 | assert_* | test_context_manager_multiple_targets | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
MultipleContextManagerAssignmentsViolation,
)
from wemake_python_styleguide.visitors.ast.keywords import (
WrongContextManagerVisitor,
)
incorrect_count = """
def wrapper():
with open('') as first, second:... | [MultipleContextManagerAssignmentsViolation]) | added | bd096badb616cd8f60b0214d1b3c67925a121d527be477dab9edb07ddf29a99f | assert_*|test_context_manager_multiple_targets|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MultipleContextManagerAssignmentsViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( WrongContextManagerVisitor, ) incorrect_count = """ def wrapper():... | null | null | null |
wemake-services/wemake-python-styleguide | train | 115 | 7bf1435c19f7ee11fd8c112fc992bb37138ba9be | train | tests/test_visitors/test_ast/test_keywords/test_loops/test_lambda_in_loop.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_loops/test_lambda_in_loop.py | 54 | 4 | assert_* | test_lambda_body | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.keywords import (
LambdaInsideLoopViolation,
WrongLoopVisitor,
)
lambda_inside_for_loop = """
def wrapper():
for index in range(10):
print(lambda: index)
"""
nested_lambda_inside_for_loop = """
def wrapper():
fo... | [LambdaInsideLoopViolation]) | modified | 5154a368f99049ea73fd2ccec7f4a5b3e3d31245cc70f6c36007634c07322eac | assert_*|test_lambda_body|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.keywords import ( LambdaInsideLoopViolation, WrongLoopVisitor, ) lambda_inside_for_loop = """ def wrapper(): for index in range(10): print(lambda: index) """ nested_lambda_inside_for_loop = """ def wrapper(): for ... | [LambdaInsideLoopViolation]) | 51 | 4 |
wemake-services/wemake-python-styleguide | train | 115 | 7bf1435c19f7ee11fd8c112fc992bb37138ba9be | train | tests/test_visitors/test_ast/test_keywords/test_loops/test_loop_with_else.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_loops/test_loop_with_else.py | 152 | 4 | assert_* | test_wrong_else_in_for_loop | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
RedundantLoopElseViolation,
)
from wemake_python_styleguide.visitors.ast.keywords import WrongLoopVisitor
wrong_else_in_for_loop = """
def wrapper():
for x in '123':
...
else:
...
"""
w... | [RedundantLoopElseViolation]) | added | a41716efc89b4bcac46e1b9b63fd9b382d7f5140e102893edfb845f69baf5fcd | assert_*|test_wrong_else_in_for_loop|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( RedundantLoopElseViolation, ) from wemake_python_styleguide.visitors.ast.keywords import WrongLoopVisitor wrong_else_in_for_loop = """ def wrapper(): for x in '123': ... else: ... ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 115 | 7bf1435c19f7ee11fd8c112fc992bb37138ba9be | train | tests/test_visitors/test_ast/test_statements/test_parameters_indentation/test_base_classes_indentation.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_parameters_indentation/test_base_classes_indentation.py | 120 | 4 | assert_* | test_wrong_class_indentation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.statements import (
ParametersIndentationViolation,
WrongParametersIndentationVisitor,
)
# Correct:
correct_single_line_class = 'class Test(First, Second, Third): ...'
correct_multi_line_class = """
class Test(
First,
S... | [ParametersIndentationViolation]) | added | 11b2c768c93784fb6298dd0e7d98720a9becac9c28f913a7b25407505cff9679 | assert_*|test_wrong_class_indentation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.statements import ( ParametersIndentationViolation, WrongParametersIndentationVisitor, ) # Correct: correct_single_line_class = 'class Test(First, Second, Third): ...' correct_multi_line_class = """ cl... | null | null | null |
wemake-services/wemake-python-styleguide | train | 115 | 7bf1435c19f7ee11fd8c112fc992bb37138ba9be | train | tests/test_visitors/test_ast/test_statements/test_parameters_indentation/test_call_indentation.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_parameters_indentation/test_call_indentation.py | 174 | 4 | assert_* | test_wrong_call_indentation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.statements import (
ParametersIndentationViolation,
WrongParametersIndentationVisitor,
)
# Correct:
correct_single_line_call = 'print(1, 2, 3)'
correct_multi_line_call = """
print(
1,
2,
3,
)
"""
correct_multi_line... | [ParametersIndentationViolation]) | added | 2c4076aa8122d5adbbe0dc911e6a5544216ed7753c4e9cfbafdff3070b8d7920 | assert_*|test_wrong_call_indentation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.statements import ( ParametersIndentationViolation, WrongParametersIndentationVisitor, ) # Correct: correct_single_line_call = 'print(1, 2, 3)' correct_multi_line_call = """ print( 1, 2, 3, ) """ correc... | null | null | null |
wemake-services/wemake-python-styleguide | train | 115 | 7bf1435c19f7ee11fd8c112fc992bb37138ba9be | train | tests/test_visitors/test_ast/test_statements/test_parameters_indentation/test_collection_indentation.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_parameters_indentation/test_collection_indentation.py | 254 | 4 | assert_* | test_wrong_collection_indentation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.statements import (
ParametersIndentationViolation,
WrongParametersIndentationVisitor,
)
# Correct:
correct_single_line_tuple = 'xy = (1, 2, 3)'
correct_single_line_list = 'xy = [1, 2, 3]'
correct_single_line_set = 'xy = {1, 2,... | [ParametersIndentationViolation]) | added | 339e21ce851513e0e1153fbc0c943c2c2fbb73747f93cd32bc5b2e739ccaaf26 | assert_*|test_wrong_collection_indentation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.statements import ( ParametersIndentationViolation, WrongParametersIndentationVisitor, ) # Correct: correct_single_line_tuple = 'xy = (1, 2, 3)' correct_single_line_list = 'xy = [1, 2, 3]' correct... | null | null | null |
wemake-services/wemake-python-styleguide | train | 115 | 7bf1435c19f7ee11fd8c112fc992bb37138ba9be | train | tests/test_visitors/test_ast/test_statements/test_parameters_indentation/test_function_indentation.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_parameters_indentation/test_function_indentation.py | 130 | 4 | assert_* | test_wrong_function_indentation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.statements import (
ParametersIndentationViolation,
WrongParametersIndentationVisitor,
)
# Correct:
correct_single_line_function = 'def test(arg, *args, kw, **kwargs): ...'
correct_multi_line_function = """
def test(
arg,
... | [ParametersIndentationViolation]) | added | ad74f31d34f3aa4f950a422b6aa3f242df4769ab59d734c2463668cc291c8d49 | assert_*|test_wrong_function_indentation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.statements import ( ParametersIndentationViolation, WrongParametersIndentationVisitor, ) # Correct: correct_single_line_function = 'def test(arg, *args, kw, **kwargs): ...' correct_multi_line_functi... | null | null | null |
wemake-services/wemake-python-styleguide | train | 116 | 254989b167ddf75f0e5dde278c99af1cf3d61cf7 | train | tests/test_violations/test_docs.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_docs.py | 50 | 16 | assert | test_configuration | # -*- coding: utf-8 -*-
from wemake_python_styleguide.options.config import Configuration
def test_all_violations_are_documented(all_module_violations):
"""Ensures that all violations are documented."""
for module, classes in all_module_violations.items():
for violation_class in classes:
... | violation.__doc__ | modified | 08e656b0052030065ed13cc016c6a7824d15f995ecc3e480d173924a35ce4a3c | assert|test_configuration|# -*- coding: utf-8 -*- from wemake_python_styleguide.options.config import Configuration def test_all_violations_are_documented(all_module_violations): """Ensures that all violations are documented.""" for module, classes in all_module_violations.items(): for violation_class in classes: # Onc... | violation.__doc__ | 50 | 16 |
wemake-services/wemake-python-styleguide | train | 116 | 254989b167ddf75f0e5dde278c99af1cf3d61cf7 | train | tests/test_violations/test_docs.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_docs.py | 51 | 16 | assert | test_configuration | # -*- coding: utf-8 -*-
from wemake_python_styleguide.options.config import Configuration
def test_all_violations_are_documented(all_module_violations):
"""Ensures that all violations are documented."""
for module, classes in all_module_violations.items():
for violation_class in classes:
... | violation.__doc__ | modified | 61c3fdd4039e40fd7165da800a2db5c2506acbb15d05d323274e8f5d9c019063 | assert|test_configuration|# -*- coding: utf-8 -*- from wemake_python_styleguide.options.config import Configuration def test_all_violations_are_documented(all_module_violations): """Ensures that all violations are documented.""" for module, classes in all_module_violations.items(): for violation_class in classes: # Onc... | violation.__doc__ | 51 | 16 |
wemake-services/wemake-python-styleguide | train | 116 | 254989b167ddf75f0e5dde278c99af1cf3d61cf7 | train | tests/test_violations/test_docs.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_docs.py | 54 | 8 | assert | test_configuration | # -*- coding: utf-8 -*-
from wemake_python_styleguide.options.config import Configuration
def test_all_violations_are_documented(all_module_violations):
"""Ensures that all violations are documented."""
for module, classes in all_module_violations.items():
for violation_class in classes:
... | is_listed | modified | b1f7abe5595fe9c9a3f359d742e9b3660be3766bc6d6487bc7b60128d3b090e4 | assert|test_configuration|# -*- coding: utf-8 -*- from wemake_python_styleguide.options.config import Configuration def test_all_violations_are_documented(all_module_violations): """Ensures that all violations are documented.""" for module, classes in all_module_violations.items(): for violation_class in classes: # Onc... | is_listed | 54 | 8 |
wemake-services/wemake-python-styleguide | train | 116 | 254989b167ddf75f0e5dde278c99af1cf3d61cf7 | train | tests/test_visitors/test_ast/test_functions/test_boolean_args.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_boolean_args.py | 82 | 4 | assert_* | test_wrong_boolean_argument | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
BooleanPositionalArgumentViolation,
)
from wemake_python_styleguide.visitors.ast.functions import (
WrongFunctionCallVisitor,
)
correct_argument = 'some(0, 1, keyword={0}, other={0})'
wrong_argument = 'some... | [BooleanPositionalArgumentViolation]) | added | d5b7fe5ff99ccc2742e954f4d051d0b43bfb044d3eddbc0c24d6a9958066a7d5 | assert_*|test_wrong_boolean_argument|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BooleanPositionalArgumentViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( WrongFunctionCallVisitor, ) correct_argument = 'some(0, 1, keyword={0}, other={0... | null | null | null |
wemake-services/wemake-python-styleguide | train | 117 | dde3787697343a82d556b57e04f8e547466587a0 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 148 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name =... | octal_number | modified | 1614605c027e16067502d05a14158117f74818c9ba123700c6c867df521e97fc | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u... | octal_number | 146 | 0 | |
wemake-services/wemake-python-styleguide | train | 117 | dde3787697343a82d556b57e04f8e547466587a0 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 158 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name =... | hex_number | modified | 72b20453f6fbbfd8e4ac0039e41c71a6026e8d58ec59a6955da23604771be803 | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u... | hex_number | 156 | 0 | |
wemake-services/wemake-python-styleguide | train | 117 | dde3787697343a82d556b57e04f8e547466587a0 | train | tests/test_visitors/test_ast/test_complexity/test_classes/test_bases_classes_counts.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_classes/test_bases_classes_counts.py | 76 | 4 | assert_* | test_bad_number_default_option | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.complexity import (
TooManyBaseClassesViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.classes import (
ClassComplexityVisitor,
)
correct_count = """
class CorrectClassName(
FirstParentClass,
SecondParent... | [TooManyBaseClassesViolation]) | added | 2429e24b410482f6d53821a98f1974940f8efabf95a23fddc92e6af66904515d | assert_*|test_bad_number_default_option|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooManyBaseClassesViolation, ) from wemake_python_styleguide.visitors.ast.complexity.classes import ( ClassComplexityVisitor, ) correct_count = """ class CorrectClassName( FirstPare... | null | null | null |
wemake-services/wemake-python-styleguide | train | 117 | dde3787697343a82d556b57e04f8e547466587a0 | train | tests/test_visitors/test_ast/test_statements/test_statements_with_no_effect.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_statements_with_no_effect.py | 357 | 4 | assert_* | test_statement_with_useless_docstring | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
StatementHasNoEffectViolation,
)
from wemake_python_styleguide.visitors.ast.statements import (
StatementsWithBodiesVisitor,
)
# Modules:
module_template = """
{0}
"""
# Simple conditions:
if_template = ... | [StatementHasNoEffectViolation]) | modified | 57b2b3bdee574289f4f932eebb5330925d4215a3ee93e8d319fd3bf69cdd8cae | assert_*|test_statement_with_useless_docstring|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( StatementHasNoEffectViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( StatementsWithBodiesVisitor, ) # Modules: module_template = """ {0} """ # ... | [StatementHasNoEffectViolation]) | 356 | 4 |
wemake-services/wemake-python-styleguide | train | 118 | e623b09924fbf9c71af2c6f1c26a6fe6c68f45cd | train | tests/test_options.py | train | wemake-services/wemake-python-styleguide:tests/test_options.py | 17 | 8 | assert | test_option_help | # -*- coding: utf-8 -*-
from wemake_python_styleguide.options.config import Configuration
def test_option_docs():
"""Ensures that all options are documented."""
for option in Configuration.options:
option_name = '``' + option.long_option_name[2:] + '``'
assert option_name in Configuration.__d... | option.help | modified | 0aced0a4a19194afb46a8cc979941b4dbabe948632b40f5632714003d1bb7cfc | assert|test_option_help|# -*- coding: utf-8 -*- from wemake_python_styleguide.options.config import Configuration def test_option_docs(): """Ensures that all options are documented.""" for option in Configuration.options: option_name = '``' + option.long_option_name[2:] + '``' assert option_name in Configuration.__doc_... | option.help.endswith('.') | 17 | 8 |
wemake-services/wemake-python-styleguide | train | 118 | e623b09924fbf9c71af2c6f1c26a6fe6c68f45cd | train | tests/test_options.py | train | wemake-services/wemake-python-styleguide:tests/test_options.py | 18 | 8 | assert | test_option_help | # -*- coding: utf-8 -*-
from wemake_python_styleguide.options.config import Configuration
def test_option_docs():
"""Ensures that all options are documented."""
for option in Configuration.options:
option_name = '``' + option.long_option_name[2:] + '``'
assert option_name in Configuration.__d... | option.help.split(' Defaults to:')[0].endswith('.') | added | 041deb0fd1f74a884a65ee8ed8d8fb49482fd7b6782fc6dfd01fb96a68231d3d | assert|test_option_help|# -*- coding: utf-8 -*- from wemake_python_styleguide.options.config import Configuration def test_option_docs(): """Ensures that all options are documented.""" for option in Configuration.options: option_name = '``' + option.long_option_name[2:] + '``' assert option_name in Configuration.__doc_... | null | null | null |
wemake-services/wemake-python-styleguide | train | 119 | d51f15ef923aea5c219e69705f0a41ef92fd32b0 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 147 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name =... | octal_number | modified | e12aa727d3c2bdf0720e5e7dd15c08138f9c291611029bb924320f113c864295 | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u... | octal_number | 148 | 0 | |
wemake-services/wemake-python-styleguide | train | 119 | d51f15ef923aea5c219e69705f0a41ef92fd32b0 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 157 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name =... | hex_number | modified | 60836eb5ec5d0365353a9182979f2b2d7704452386cb5954ee672dd2a037c42e | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u... | hex_number | 158 | 0 | |
wemake-services/wemake-python-styleguide | train | 120 | 3a7fdc85a84f5849329dae9545f1b137d390d9f8 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 148 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name =... | octal_number | modified | a39c93c28071840898fad42c9e4c30029a2d3400970dd151b68b3ad4b3b73300 | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u... | octal_number | 147 | 0 | |
wemake-services/wemake-python-styleguide | train | 120 | 3a7fdc85a84f5849329dae9545f1b137d390d9f8 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 158 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name =... | hex_number | modified | 7b63eb56b5dda527a2ed4633cd117901c7bc061564b7ca54a4b0aa2d5017fa6c | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u... | hex_number | 157 | 0 | |
wemake-services/wemake-python-styleguide | train | 120 | 3a7fdc85a84f5849329dae9545f1b137d390d9f8 | train | tests/test_visitors/test_tokenize/test_statements/test_extra_indentation.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_statements/test_extra_indentation.py | 144 | 4 | assert_* | test_wrong_indentation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
ExtraIndentationViolation,
)
from wemake_python_styleguide.visitors.tokenize.statements import (
ExtraIndentationVisitor,
)
# Correct:
correct_function_with_docstring = """
def first():
'''Some text'''
... | [ExtraIndentationViolation]) | added | 6e4c59ed6632c7e492a2bb25035241dacc6ab91282e46b24036e140ba51af149 | assert_*|test_wrong_indentation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ExtraIndentationViolation, ) from wemake_python_styleguide.visitors.tokenize.statements import ( ExtraIndentationVisitor, ) # Correct: correct_function_with_docstring = """ def first(): ''... | null | null | null |
wemake-services/wemake-python-styleguide | train | 121 | 62ee22cbdb8c68a96f5ef6971274c850696e00f2 | train | tests/test_visitors/test_ast/test_statements/test_parameters_indentation/test_collection_indentation.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_parameters_indentation/test_collection_indentation.py | 263 | 4 | assert_* | test_wrong_collection_indentation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.statements import (
ParametersIndentationViolation,
WrongParametersIndentationVisitor,
)
# Correct:
correct_single_line_tuple = 'xy = (1, 2, 3)'
correct_single_line_list = 'xy = [1, 2, 3]'
correct_single_line_set = 'xy = {1, 2,... | [ParametersIndentationViolation]) | added | 1536d698b4bcd8d33ecf1bc52438822718fa0e4d25e907747f06b7dafb780a40 | assert_*|test_wrong_collection_indentation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.statements import ( ParametersIndentationViolation, WrongParametersIndentationVisitor, ) # Correct: correct_single_line_tuple = 'xy = (1, 2, 3)' correct_single_line_list = 'xy = [1, 2, 3]' correct... | null | null | null |
wemake-services/wemake-python-styleguide | train | 121 | 62ee22cbdb8c68a96f5ef6971274c850696e00f2 | train | tests/test_visitors/test_tokenize/test_statements/test_bracket_lines.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_statements/test_bracket_lines.py | 165 | 4 | assert_* | test_wrong_brackets | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
WrongBracketPositionViolation,
)
from wemake_python_styleguide.visitors.tokenize.statements import (
BracketLocationVisitor,
)
# Correct:
correct_annotated_variable = 'xy: Optional[int] = some()'
correct_fun... | [WrongBracketPositionViolation]) | added | 77314da255aaaaa2599704e80db8411dbeafb7e33e05d269a3f6485724ce970b | assert_*|test_wrong_brackets|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( WrongBracketPositionViolation, ) from wemake_python_styleguide.visitors.tokenize.statements import ( BracketLocationVisitor, ) # Correct: correct_annotated_variable = 'xy: Optional[int] = som... | null | null | null |
wemake-services/wemake-python-styleguide | train | 121 | 62ee22cbdb8c68a96f5ef6971274c850696e00f2 | train | tests/test_visitors/test_tokenize/test_statements/test_extra_indentation.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_statements/test_extra_indentation.py | 152 | 4 | assert_* | test_wrong_indentation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
ExtraIndentationViolation,
)
from wemake_python_styleguide.visitors.tokenize.statements import (
ExtraIndentationVisitor,
)
# Correct:
correct_function_with_docstring = """
def first():
'''Some text'''
... | [ExtraIndentationViolation]) | added | 4e8c6af21f02d17f0a599246770aa11c4c060eb478083f0bb7dea9d766871d79 | assert_*|test_wrong_indentation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ExtraIndentationViolation, ) from wemake_python_styleguide.visitors.tokenize.statements import ( ExtraIndentationVisitor, ) # Correct: correct_function_with_docstring = """ def first(): ''... | null | null | null |
wemake-services/wemake-python-styleguide | train | 122 | bc0e6bfa0b911973e05a0291a4715bf7ce5e7e4b | train | tests/test_visitors/test_ast/test_annotations/test_argument_annotations.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_annotations/test_argument_annotations.py | 72 | 4 | assert_* | test_wrong_argument_annotation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.annotations import (
MultilineFunctionAnnotationViolation,
WrongAnnotationVisitor,
)
# Correct:
correct_function_without_arguments = """
def function(): ...
"""
correct_function_without_annotations = """
def function(arg, arg1... | [MultilineFunctionAnnotationViolation]) | added | 2cf7c1fdb212af4856194b414afc30546700a71acfa6ee340c941d3ae995dc70 | assert_*|test_wrong_argument_annotation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.annotations import ( MultilineFunctionAnnotationViolation, WrongAnnotationVisitor, ) # Correct: correct_function_without_arguments = """ def function(): ... """ correct_function_without_annotations =... | null | null | null |
wemake-services/wemake-python-styleguide | train | 122 | bc0e6bfa0b911973e05a0291a4715bf7ce5e7e4b | train | tests/test_visitors/test_ast/test_annotations/test_return_annotations.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_annotations/test_return_annotations.py | 80 | 4 | assert_* | test_wrong_return_annotation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.visitors.ast.annotations import (
MultilineFunctionAnnotationViolation,
WrongAnnotationVisitor,
)
# Correct:
correct_function_without_annotations = """
def function(): ...
"""
correct_simple_return = """
def function() -> int: ...
"""
cor... | [MultilineFunctionAnnotationViolation]) | added | fd5151dffec6dfc94adf8651df0dffc339cd901e2b5555437dd5c95965454340 | assert_*|test_wrong_return_annotation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.visitors.ast.annotations import ( MultilineFunctionAnnotationViolation, WrongAnnotationVisitor, ) # Correct: correct_function_without_annotations = """ def function(): ... """ correct_simple_return = """ def functi... | null | null | null |
wemake-services/wemake-python-styleguide | train | 123 | 4ae27b61e20cceeb1e88963d9c62368e6c3ae6cb | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 156 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name =... | octal_number | modified | 1203bff19ad028ec45756ed48099ea88650d89cd1270ce111682be775799cf9f | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u... | hex_number | 158 | 0 | |
wemake-services/wemake-python-styleguide | train | 123 | 4ae27b61e20cceeb1e88963d9c62368e6c3ae6cb | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 166 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: Z422
from .version import get_version # noqa: Z300
import os.path # noqa: Z301
import sys as sys # noqa: Z113
from some import _protected # noqa: Z440
full_name =... | hex_number | added | 8fa1ca36052338b4482e66be259be470d50c3e5b9dc1ec3441411b0cdbeae279 | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: Z422 from .version import get_version # noqa: Z300 import os.path # noqa: Z301 import sys as sys # noqa: Z113 from some import _protected # noqa: Z440 full_name = u... | null | null | null | |
wemake-services/wemake-python-styleguide | train | 123 | 4ae27b61e20cceeb1e88963d9c62368e6c3ae6cb | train | tests/test_violations/test_docs.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_docs.py | 38 | 16 | assert | test_configuration | # -*- coding: utf-8 -*-
from wemake_python_styleguide.options.config import Configuration
def test_all_violations_are_documented(all_module_violations):
"""Ensures that all violations are documented."""
for module, classes in all_module_violations.items():
for violation_class in classes:
... | violation.__doc__ | added | cd4d92c4abfab46541359508650b378310b2ed57ea339cf20cf0095d93173ae5 | assert|test_configuration|# -*- coding: utf-8 -*- from wemake_python_styleguide.options.config import Configuration def test_all_violations_are_documented(all_module_violations): """Ensures that all violations are documented.""" for module, classes in all_module_violations.items(): for violation_class in classes: # Onc... | null | null | null |
wemake-services/wemake-python-styleguide | train | 123 | 4ae27b61e20cceeb1e88963d9c62368e6c3ae6cb | train | tests/test_violations/test_docs.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_docs.py | 39 | 16 | assert | test_configuration | # -*- coding: utf-8 -*-
from wemake_python_styleguide.options.config import Configuration
def test_all_violations_are_documented(all_module_violations):
"""Ensures that all violations are documented."""
for module, classes in all_module_violations.items():
for violation_class in classes:
... | violation.__doc__ | added | 34b12fe929a57d4b3159c7d27be90ddb1a15d46282db47acad1d17035e140e5c | assert|test_configuration|# -*- coding: utf-8 -*- from wemake_python_styleguide.options.config import Configuration def test_all_violations_are_documented(all_module_violations): """Ensures that all violations are documented.""" for module, classes in all_module_violations.items(): for violation_class in classes: # Onc... | null | null | null |
wemake-services/wemake-python-styleguide | train | 123 | 4ae27b61e20cceeb1e88963d9c62368e6c3ae6cb | train | tests/test_visitors/conftest.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/conftest.py | 37 | 8 | assert | # -*- coding: utf-8 -*-
from typing import Sequence
import pytest
from wemake_python_styleguide.violations.base import (
ASTViolation,
TokenizeViolation,
)
from wemake_python_styleguide.visitors.base import BaseVisitor
@pytest.fixture(scope='session')
def assert_errors():
"""Helper function to assert v... | violation.error_template | modified | a26f0665c4d71b3b6396c8cbe47910356286af2e7fae5b051b0ae3cbe1f55d1e | assert||# -*- coding: utf-8 -*- from typing import Sequence import pytest from wemake_python_styleguide.violations.base import ( ASTViolation, TokenizeViolation, ) from wemake_python_styleguide.visitors.base import BaseVisitor @pytest.fixture(scope='session') def assert_errors(): """Helper function to assert visitor vi... | violation.__class__.should_use_text | 35 | 8 | |
wemake-services/wemake-python-styleguide | train | 123 | 4ae27b61e20cceeb1e88963d9c62368e6c3ae6cb | train | tests/test_visitors/conftest.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/conftest.py | 38 | 8 | assert | # -*- coding: utf-8 -*-
from typing import Sequence
import pytest
from wemake_python_styleguide.violations.base import (
ASTViolation,
TokenizeViolation,
)
from wemake_python_styleguide.visitors.base import BaseVisitor
@pytest.fixture(scope='session')
def assert_errors():
"""Helper function to assert v... | violation.error_template.endswith(error_format) | added | 54b4bf1cc080e4f6e244b5d0a93b38198ddf0bbcee2e5d936149486294b6ca60 | assert||# -*- coding: utf-8 -*- from typing import Sequence import pytest from wemake_python_styleguide.violations.base import ( ASTViolation, TokenizeViolation, ) from wemake_python_styleguide.visitors.base import BaseVisitor @pytest.fixture(scope='session') def assert_errors(): """Helper function to assert visitor vi... | null | null | null | |
wemake-services/wemake-python-styleguide | train | 123 | 4ae27b61e20cceeb1e88963d9c62368e6c3ae6cb | train | tests/test_visitors/conftest.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/conftest.py | 44 | 8 | assert | # -*- coding: utf-8 -*-
from typing import Sequence
import pytest
from wemake_python_styleguide.violations.base import (
ASTViolation,
TokenizeViolation,
)
from wemake_python_styleguide.visitors.base import BaseVisitor
@pytest.fixture(scope='session')
def assert_errors():
"""Helper function to assert v... | violation.message() | modified | 272d4d04d7084fae62f4913ce7e68c97595fee9226dcd8938f63c21821257c98 | assert||# -*- coding: utf-8 -*- from typing import Sequence import pytest from wemake_python_styleguide.violations.base import ( ASTViolation, TokenizeViolation, ) from wemake_python_styleguide.visitors.base import BaseVisitor @pytest.fixture(scope='session') def assert_errors(): """Helper function to assert visitor vi... | violation.message() | 41 | 8 | |
wemake-services/wemake-python-styleguide | train | 123 | 4ae27b61e20cceeb1e88963d9c62368e6c3ae6cb | train | tests/test_visitors/test_tokenize/test_statements/test_extra_indentation.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_statements/test_extra_indentation.py | 158 | 4 | assert_* | test_wrong_indentation | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
ExtraIndentationViolation,
)
from wemake_python_styleguide.visitors.tokenize.statements import (
ExtraIndentationVisitor,
)
# Correct:
correct_function_with_docstring = """
def first():
'''Some text'''
... | [ExtraIndentationViolation]) | added | 09a3c3df1e9a8aae6a36f07e0802e2ef32e5dda35fb198f7bb64d4018f7d9bc2 | assert_*|test_wrong_indentation|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( ExtraIndentationViolation, ) from wemake_python_styleguide.visitors.tokenize.statements import ( ExtraIndentationVisitor, ) # Correct: correct_function_with_docstring = """ def first(): ''... | null | null | null |
wemake-services/wemake-python-styleguide | train | 124 | a28cdbbddbbe7890d9eda32c1f6fd6e3172ea1ac | train | tests/test_visitors/conftest.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/conftest.py | 23 | 16 | assert | # -*- coding: utf-8 -*-
from typing import Sequence
import pytest
from wemake_python_styleguide.violations.base import (
ASTViolation,
TokenizeViolation,
)
from wemake_python_styleguide.visitors.base import BaseVisitor
@pytest.fixture(scope='session')
def assert_errors():
"""Helper function to assert v... | None | added | 1c87c01e5e9c766c21fddd05d27d85a73d15b8a45b094dec3ef242d86e472026 | assert||# -*- coding: utf-8 -*- from typing import Sequence import pytest from wemake_python_styleguide.violations.base import ( ASTViolation, TokenizeViolation, ) from wemake_python_styleguide.visitors.base import BaseVisitor @pytest.fixture(scope='session') def assert_errors(): """Helper function to assert visitor vi... | null | null | null | |
wemake-services/wemake-python-styleguide | train | 124 | a28cdbbddbbe7890d9eda32c1f6fd6e3172ea1ac | train | tests/test_visitors/conftest.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/conftest.py | 38 | 8 | assert | # -*- coding: utf-8 -*-
from typing import Sequence
import pytest
from wemake_python_styleguide.violations.base import (
ASTViolation,
TokenizeViolation,
)
from wemake_python_styleguide.visitors.base import BaseVisitor
@pytest.fixture(scope='session')
def assert_errors():
"""Helper function to assert v... | violation.error_template | modified | c5dc17acf9f0a2fa35871c97852eef2de8419154ae634d3755ed198f74909a64 | assert||# -*- coding: utf-8 -*- from typing import Sequence import pytest from wemake_python_styleguide.violations.base import ( ASTViolation, TokenizeViolation, ) from wemake_python_styleguide.visitors.base import BaseVisitor @pytest.fixture(scope='session') def assert_errors(): """Helper function to assert visitor vi... | violation.error_template | 37 | 8 | |
wemake-services/wemake-python-styleguide | train | 124 | a28cdbbddbbe7890d9eda32c1f6fd6e3172ea1ac | train | tests/test_visitors/conftest.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/conftest.py | 39 | 8 | assert | # -*- coding: utf-8 -*-
from typing import Sequence
import pytest
from wemake_python_styleguide.violations.base import (
ASTViolation,
TokenizeViolation,
)
from wemake_python_styleguide.visitors.base import BaseVisitor
@pytest.fixture(scope='session')
def assert_errors():
"""Helper function to assert v... | violation.error_template.endswith(error_format) | modified | b7b3aa2d14c7be0a91b4c61bdf08a7f04058b1a18e6d38e76eb1339f4dc04d83 | assert||# -*- coding: utf-8 -*- from typing import Sequence import pytest from wemake_python_styleguide.violations.base import ( ASTViolation, TokenizeViolation, ) from wemake_python_styleguide.visitors.base import BaseVisitor @pytest.fixture(scope='session') def assert_errors(): """Helper function to assert visitor vi... | violation.error_template.endswith(error_format) | 38 | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.