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 | 324 | 04ced26064668e2c70ea2440dc50bab63603d606 | train | tests/test_visitors/test_ast/test_functions/test_super_call.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_super_call.py | 190 | 4 | assert_* | test_wrong_access_super_call_with_args | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.oop import (
WrongSuperCallAccessViolation,
WrongSuperCallViolation,
)
from wemake_python_styleguide.visitors.ast.functions import (
WrongFunctionCallVisitor,
)
# Template for super call with method and property tests
super_c... | [ WrongSuperCallAccessViolation, WrongSuperCallViolation, ]) | added | 045feb391305567fde739770c7c54e8ef8ddf928ab2ac69f2c9fa676e72e75a0 | assert_*|test_wrong_access_super_call_with_args|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.oop import ( WrongSuperCallAccessViolation, WrongSuperCallViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( WrongFunctionCallVisitor, ) # Template for super call with m... | null | null | null |
wemake-services/wemake-python-styleguide | train | 325 | 335cff17a11fd764160fc6300d5c22d961b9ac37 | train | tests/test_visitors/test_ast/test_modules/test_magic_module_functions.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_modules/test_magic_module_functions.py | 64 | 4 | assert_* | test_wrong_magic_used | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.constants import MAGIC_MODULE_NAMES_BLACKLIST
from wemake_python_styleguide.violations.best_practices import (
BadMagicModuleFunctionViolation,
)
from wemake_python_styleguide.visitors.ast.modules import (
MagicModuleFunctionsVisitor,
)
modu... | [BadMagicModuleFunctionViolation]) | added | 496ddf8a351561028b94ef3d1b147cecc1ea7fa94b055a946c4b6364efdf1c49 | assert_*|test_wrong_magic_used|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.constants import MAGIC_MODULE_NAMES_BLACKLIST from wemake_python_styleguide.violations.best_practices import ( BadMagicModuleFunctionViolation, ) from wemake_python_styleguide.visitors.ast.modules import ( MagicModuleFunc... | null | null | null |
wemake-services/wemake-python-styleguide | train | 327 | a97fdd1133574f39e8edf07567c941a9d78c3c44 | train | tests/test_visitors/test_ast/test_annotations/test_multiline_annotations/test_argument_annotations.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_annotations/test_multiline_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 | f7e846a05dbd4b3351d7d566c3f5935009fbcd96c11f279dc5b2741baacab7b6 | 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 | 327 | a97fdd1133574f39e8edf07567c941a9d78c3c44 | train | tests/test_visitors/test_ast/test_annotations/test_multiline_annotations/test_return_annotations.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_annotations/test_multiline_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]) | modified | b4dfde53f755099df0eabbc07096ee91b06bc19d4d108fc7c5f08d7db3cbe95e | 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... | [MultilineFunctionAnnotationViolation]) | 80 | 4 |
wemake-services/wemake-python-styleguide | train | 328 | ade6fc1e42135aecd0ff2f7d5683c51e3846c8d5 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 242 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from some import _protected # noqa: WPS436
from .version import get_version # noqa: WPS300
... | hex_number | modified | ba884ba81dacf6d9f6f508773931dcb61564fe7ec9ae2ab57ebb5619a487cb34 | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ful... | hex_number | 242 | 0 | |
wemake-services/wemake-python-styleguide | train | 328 | ade6fc1e42135aecd0ff2f7d5683c51e3846c8d5 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 233 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors | modified | e72fad99d86672c1567d6c7f5d7644583f8dd9251389ad4c6ab8ec95d5e72894 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors | 232 | 8 | |
wemake-services/wemake-python-styleguide | train | 328 | ade6fc1e42135aecd0ff2f7d5683c51e3846c8d5 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 236 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors | modified | e5bbda0f2fc453ecfeff7e39ee944a80ae2ba9beb52bd0196b6e9dea6ef02d61 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors | 235 | 8 | |
wemake-services/wemake-python-styleguide | train | 328 | ade6fc1e42135aecd0ff2f7d5683c51e3846c8d5 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 237 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors.get(found_error) | modified | b696b2d77909039e98f22d01ee83d2f07326b35d724e0ec0dc2d53c65fb0288f | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors.get(found_error) | 236 | 8 | |
wemake-services/wemake-python-styleguide | train | 328 | ade6fc1e42135aecd0ff2f7d5683c51e3846c8d5 | train | tests/test_visitors/test_ast/test_compares/test_in_type_check.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_in_type_check.py | 45 | 4 | assert_* | test_compare_with_wrong_type | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.refactoring import (
InCompareWithSingleItemContainerViolation,
WrongInCompareTypeViolation,
)
from wemake_python_styleguide.visitors.ast.compares import (
InCompareSanityVisitor,
)
in_template = 'some in {0}'
not_in_template ... | [WrongInCompareTypeViolation]) | modified | 92481c9ab99d42dc7cbec7916c84084fcc46e2d6b7aed40e77c6a59c16a4daa6 | assert_*|test_compare_with_wrong_type|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( InCompareWithSingleItemContainerViolation, WrongInCompareTypeViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( InCompareSanityVisitor, ) in_template = 'some i... | [WrongInCompareTypeViolation]) | 42 | 4 |
wemake-services/wemake-python-styleguide | train | 328 | ade6fc1e42135aecd0ff2f7d5683c51e3846c8d5 | train | tests/test_visitors/test_ast/test_compares/test_in_with_single_item_container.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_in_with_single_item_container.py | 34 | 4 | assert_* | test_single_item_container | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.refactoring import (
InCompareWithSingleItemContainerViolation,
WrongInCompareTypeViolation,
)
from wemake_python_styleguide.visitors.ast.compares import (
InCompareSanityVisitor,
)
@pytest.mark.parametrize('code', [
'if ... | [InCompareWithSingleItemContainerViolation]) | added | 45f122e19f156427969464f4e1c8adb0c39433919499d88a8988d3d773d5cb83 | assert_*|test_single_item_container|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( InCompareWithSingleItemContainerViolation, WrongInCompareTypeViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( InCompareSanityVisitor, ) @pytest.mark.parametriz... | null | null | null |
wemake-services/wemake-python-styleguide | train | 328 | ade6fc1e42135aecd0ff2f7d5683c51e3846c8d5 | train | tests/test_visitors/test_ast/test_compares/test_multiple_in.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_multiple_in.py | 80 | 4 | assert_* | test_compare_with_multiple_in | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
MultipleInCompareViolation,
)
from wemake_python_styleguide.violations.refactoring import (
InCompareWithSingleItemContainerViolation,
)
from wemake_python_styleguide.visitors.ast.compares import (
InCompar... | [MultipleInCompareViolation]) | added | ba12ff209bfd4716b507142d9ac64fc5e5276c74786d0aafd4921fcd4932c216 | assert_*|test_compare_with_multiple_in|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MultipleInCompareViolation, ) from wemake_python_styleguide.violations.refactoring import ( InCompareWithSingleItemContainerViolation, ) from wemake_python_styleguide.visitors.ast.c... | null | null | null |
wemake-services/wemake-python-styleguide | train | 328 | ade6fc1e42135aecd0ff2f7d5683c51e3846c8d5 | train | tests/test_visitors/test_ast/test_compares/test_multiple_in.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_multiple_in.py | 98 | 4 | assert_* | test_compare_with_mixed_in | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
MultipleInCompareViolation,
)
from wemake_python_styleguide.violations.refactoring import (
InCompareWithSingleItemContainerViolation,
)
from wemake_python_styleguide.visitors.ast.compares import (
InCompar... | [MultipleInCompareViolation]) | added | fd94428bb2859d330ab99791d4466f0afb1a3b5c64eb90a99d10e21cee69e89d | assert_*|test_compare_with_mixed_in|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MultipleInCompareViolation, ) from wemake_python_styleguide.violations.refactoring import ( InCompareWithSingleItemContainerViolation, ) from wemake_python_styleguide.visitors.ast.comp... | null | null | null |
wemake-services/wemake-python-styleguide | train | 329 | 9bb474b96f9d571b846e40eb33c9ed1e92517097 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 234 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors | modified | 417ee4457becf122bd235afbf4fa09add84c22aefdac18117dd6174c87febc13 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors | 233 | 8 | |
wemake-services/wemake-python-styleguide | train | 329 | 9bb474b96f9d571b846e40eb33c9ed1e92517097 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 237 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors | modified | facf15579e86931f3073d0938e3c1c00ad281a50f007b6051f688cf598372f2f | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors | 236 | 8 | |
wemake-services/wemake-python-styleguide | train | 329 | 9bb474b96f9d571b846e40eb33c9ed1e92517097 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 238 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors.get(found_error) | modified | 97484759c370007e2eeb5ba3b6cc9b62c290314aab3df03a6a6b5d06062deaa4 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors.get(found_error) | 237 | 8 | |
wemake-services/wemake-python-styleguide | train | 329 | 9bb474b96f9d571b846e40eb33c9ed1e92517097 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 266 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | len(all_violations) | modified | cf847f7d6d98035b1bed0b22362558873bdb53d2772480f53c4f2791d6a00734 | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wem... | len(all_violations) | 265 | 4 |
wemake-services/wemake-python-styleguide | train | 329 | 9bb474b96f9d571b846e40eb33c9ed1e92517097 | train | tests/test_visitors/test_ast/test_loops/test_loops/test_multiline_loops.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_loops/test_multiline_loops.py | 67 | 4 | assert_* | test_incorrect_multiline_loops | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
MultilineLoopViolation,
)
from wemake_python_styleguide.visitors.ast.loops import WrongLoopVisitor
incorrect_loop1 = """
def wrapper():
for x in some_func(1,
3):
...
"""
incorrect_loop2 = """
def ... | [MultilineLoopViolation]) | added | c9fc450af957428ccfc4864db0a30ee58092d78f2c673428a12e64f5dd84910f | assert_*|test_incorrect_multiline_loops|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MultilineLoopViolation, ) from wemake_python_styleguide.visitors.ast.loops import WrongLoopVisitor incorrect_loop1 = """ def wrapper(): for x in some_func(1, 3): ... """ incorrect_... | null | null | null |
wemake-services/wemake-python-styleguide | train | 330 | 805be6512296baac0812b464a9edcbcb9f98d30e | train | tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return.py | 142 | 4 | assert_* | test_wrong_return_statement | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
InconsistentReturnViolation,
)
from wemake_python_styleguide.visitors.ast.keywords import (
ConsistentReturningVisitor,
)
# Correct:
correct_example1 = """
def function():
...
"""
correct_example2 = """
... | [InconsistentReturnViolation]) | added | fca92b35f666cd591c795f4869af02ca46b01d149993271959147322caeacad3 | assert_*|test_wrong_return_statement|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): ... """ cor... | null | null | null |
wemake-services/wemake-python-styleguide | train | 330 | 805be6512296baac0812b464a9edcbcb9f98d30e | train | tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_consistency_returning/test_consistency_return.py | 162 | 4 | assert_* | test_douple_wrong_return_statement | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
InconsistentReturnViolation,
)
from wemake_python_styleguide.visitors.ast.keywords import (
ConsistentReturningVisitor,
)
# Correct:
correct_example1 = """
def function():
...
"""
correct_example2 = """
... | [ InconsistentReturnViolation, InconsistentReturnViolation, ]) | added | 69836bd55f4905d6212ba04a008ad5c2eaa21c4f1e8cd019986bb282fe2231fc | assert_*|test_douple_wrong_return_statement|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( InconsistentReturnViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConsistentReturningVisitor, ) # Correct: correct_example1 = """ def function(): ... ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 331 | 924fe11aee6b65eb1b06743e131d4de76689e869 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 234 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors | modified | c2366e42ee2a7e3012d140ed3508764463c48da72fe5cbc0edada03f8ebed98b | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors | 234 | 8 | |
wemake-services/wemake-python-styleguide | train | 331 | 924fe11aee6b65eb1b06743e131d4de76689e869 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 237 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors | modified | 001730d0b62b151eabc541b44d2c21a594cee8ea2493bc8f70eb3c99bb8f2f98 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors | 237 | 8 | |
wemake-services/wemake-python-styleguide | train | 331 | 924fe11aee6b65eb1b06743e131d4de76689e869 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 238 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors.get(found_error) | modified | 247584a4d52361e71f4882b3a40bc34cd35616621e9f0ca96ecb2186f15c662f | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors.get(found_error) | 238 | 8 | |
wemake-services/wemake-python-styleguide | train | 331 | 924fe11aee6b65eb1b06743e131d4de76689e869 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 266 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | len(all_violations) | modified | 58246029a1dceb3bc1f04f1ccfae0772b41a5770431981baf97e0798c75867ef | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wem... | len(all_violations) | 266 | 4 |
wemake-services/wemake-python-styleguide | train | 331 | 924fe11aee6b65eb1b06743e131d4de76689e869 | train | tests/test_visitors/test_ast/test_imports/test_same_alias_import.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_imports/test_same_alias_import.py | 52 | 4 | assert_* | test_same_alias_import_without_control | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.naming import SameAliasImportViolation
from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor
regular_import = 'import os as {0}'
from_import = 'from sys import os as {0}'
@pytest.mark.parametrize('code', [
reg... | [SameAliasImportViolation]) | added | 3e7b3044d2111a84c5442759c671d2fe6d96c9a9207fd8f12e3ae3e364b345d5 | assert_*|test_same_alias_import_without_control|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import SameAliasImportViolation from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor regular_import = 'import os as {0}' from_import = 'from sys import os as {0}'... | null | null | null |
wemake-services/wemake-python-styleguide | train | 331 | 924fe11aee6b65eb1b06743e131d4de76689e869 | train | tests/test_visitors/test_ast/test_imports/test_same_alias_import.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_imports/test_same_alias_import.py | 53 | 4 | assert_* | test_same_alias_import_without_control | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.naming import SameAliasImportViolation
from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor
regular_import = 'import os as {0}'
from_import = 'from sys import os as {0}'
@pytest.mark.parametrize('code', [
reg... | same_alias) | added | 3a869918a2693aa159217f58640e7588432b53fb646fafc251a91906d6932657 | assert_*|test_same_alias_import_without_control|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.naming import SameAliasImportViolation from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor regular_import = 'import os as {0}' from_import = 'from sys import os as {0}'... | null | null | null |
wemake-services/wemake-python-styleguide | train | 332 | e84e7671aad08a5acc87646f1c86f20cd65ce400 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 231 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from some import _protected # noqa: WPS436
from .version import get_version # noqa: WPS300
... | octal_number | modified | e8f0dbf7072249279cbb5690cab98dd346cc3b31c3bc9329bc1ae056b1840d90 | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ful... | octal_number | 231 | 0 | |
wemake-services/wemake-python-styleguide | train | 332 | e84e7671aad08a5acc87646f1c86f20cd65ce400 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 242 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from some import _protected # noqa: WPS436
from .version import get_version # noqa: WPS300
... | hex_number | modified | a9484f19699e5de17894d02b68d1cb799c03dab7977a59fc4eb3871e8619c216 | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ful... | hex_number | 242 | 0 | |
wemake-services/wemake-python-styleguide | train | 332 | e84e7671aad08a5acc87646f1c86f20cd65ce400 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 236 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors | modified | dff1702c3fec8f90a5a2fa4185384cd478e78a11b4b537a259a604f3a10466e9 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors | 234 | 8 | |
wemake-services/wemake-python-styleguide | train | 332 | e84e7671aad08a5acc87646f1c86f20cd65ce400 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 240 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors.get(found_error) | modified | c7ac5e905c8a3926bf8c4268c1775e663b9f514dcce8e694ebb247ac7dde7030 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors.get(found_error) | 238 | 8 | |
wemake-services/wemake-python-styleguide | train | 332 | e84e7671aad08a5acc87646f1c86f20cd65ce400 | train | tests/test_visitors/conftest.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/conftest.py | 52 | 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 | 19f12ab4d6b89748b4437f791c8a0ea31bbc71675d73855d91d6e70529d81084 | 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 | 51 | 8 | |
wemake-services/wemake-python-styleguide | train | 332 | e84e7671aad08a5acc87646f1c86f20cd65ce400 | train | tests/test_visitors/test_ast/test_complexity/test_function/test_cognitive/test_cognitive_average.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_function/test_cognitive/test_cognitive_average.py | 64 | 4 | assert_* | test_complex_cognitive_module | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.complexity import (
CognitiveComplexityViolation,
CognitiveModuleComplexityViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.function import (
CognitiveComplexityVisitor,
)
complex_function = """
def literal_e... | [CognitiveModuleComplexityViolation]) | added | 81ba1eb63cab47dd97c811a6b2ae30a21d0af4d4606ade34648d03f539934b90 | assert_*|test_complex_cognitive_module|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( CognitiveComplexityViolation, CognitiveModuleComplexityViolation, ) from wemake_python_styleguide.visitors.ast.complexity.function import ( CognitiveComplexityVisitor, ) complex_func... | null | null | null |
wemake-services/wemake-python-styleguide | train | 332 | e84e7671aad08a5acc87646f1c86f20cd65ce400 | train | tests/test_visitors/test_ast/test_complexity/test_function/test_cognitive/test_cognitive_average.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_function/test_cognitive/test_cognitive_average.py | 91 | 4 | assert_* | test_complex_cognitive_options | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.complexity import (
CognitiveComplexityViolation,
CognitiveModuleComplexityViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.function import (
CognitiveComplexityVisitor,
)
complex_function = """
def literal_e... | [CognitiveModuleComplexityViolation]) | added | c673168c47991eca38b5ff497bce9b447e50b581fb039d0df1cf6a37f6ddf9f2 | assert_*|test_complex_cognitive_options|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( CognitiveComplexityViolation, CognitiveModuleComplexityViolation, ) from wemake_python_styleguide.visitors.ast.complexity.function import ( CognitiveComplexityVisitor, ) complex_fun... | null | null | null |
wemake-services/wemake-python-styleguide | train | 332 | e84e7671aad08a5acc87646f1c86f20cd65ce400 | train | tests/test_visitors/test_ast/test_complexity/test_function/test_cognitive/test_cognitive_score.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_function/test_cognitive/test_cognitive_score.py | 91 | 4 | assert_* | test_complex_cognitive_options | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.complexity import (
CognitiveComplexityViolation,
CognitiveModuleComplexityViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.function import (
CognitiveComplexityVisitor,
)
complex_function = """
def literal_e... | [CognitiveComplexityViolation]) | added | 740ddbb50a7794458215ee70b1d36bc9508d715a79e2312dd661ac2d614ee65d | assert_*|test_complex_cognitive_options|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( CognitiveComplexityViolation, CognitiveModuleComplexityViolation, ) from wemake_python_styleguide.visitors.ast.complexity.function import ( CognitiveComplexityVisitor, ) complex_fun... | null | null | null |
wemake-services/wemake-python-styleguide | train | 333 | 52720a44c2ed9327b1f16653ead12f65d8ac9f93 | train | tests/test_options/test_option_values/test_i_control_code.py | train | wemake-services/wemake-python-styleguide:tests/test_options/test_option_values/test_i_control_code.py | 18 | 4 | assert | test_parsing_i_control_code | # -*- coding: utf-8 -*-
"""
This is a regression test for the argument parsing issue for boolean args.
.. versionadded:: 0.13.0
See also:
- https://github.com/wemake-services/wemake-python-styleguide/issues/966
- https://stackoverflow.com/a/15008806/4842742
"""
def test_parsing_i_control_code(option_parse... | True | added | be48192695bed557ace498af23586dddbaa5db3dc7dfb799476115f9f858db57 | assert|test_parsing_i_control_code|# -*- coding: utf-8 -*- """ This is a regression test for the argument parsing issue for boolean args. .. versionadded:: 0.13.0 See also: - https://github.com/wemake-services/wemake-python-styleguide/issues/966 - https://stackoverflow.com/a/15008806/4842742 """ def test_parsing_i_cont... | null | null | null |
wemake-services/wemake-python-styleguide | train | 333 | 52720a44c2ed9327b1f16653ead12f65d8ac9f93 | train | tests/test_options/test_option_values/test_i_control_code.py | train | wemake-services/wemake-python-styleguide:tests/test_options/test_option_values/test_i_control_code.py | 24 | 4 | assert | test_parsing_i_dont_control_code | # -*- coding: utf-8 -*-
"""
This is a regression test for the argument parsing issue for boolean args.
.. versionadded:: 0.13.0
See also:
- https://github.com/wemake-services/wemake-python-styleguide/issues/966
- https://stackoverflow.com/a/15008806/4842742
"""
def test_parsing_i_control_code(option_parse... | False | added | 1e96832cfff4dafa505a3e73ce5327d252d3d375ca9be84a2b6876036b36ecd0 | assert|test_parsing_i_dont_control_code|# -*- coding: utf-8 -*- """ This is a regression test for the argument parsing issue for boolean args. .. versionadded:: 0.13.0 See also: - https://github.com/wemake-services/wemake-python-styleguide/issues/966 - https://stackoverflow.com/a/15008806/4842742 """ def test_parsing_i... | null | null | null |
wemake-services/wemake-python-styleguide | train | 334 | 83224285b0e4fd56aae94f43133e0b5fa07714f5 | train | tests/test_checker/test_exception_handling.py | train | wemake-services/wemake-python-styleguide:tests/test_checker/test_exception_handling.py | 27 | 8 | assert | test_exception_handling | # -*- coding: utf-8 -*-
import ast
from contextlib import suppress
from wemake_python_styleguide.checker import Checker
from wemake_python_styleguide.violations.system import InternalErrorViolation
from wemake_python_styleguide.visitors.base import BaseNodeVisitor
class _BrokenVisitor(BaseNodeVisitor):
def visi... | InternalErrorViolation.error_template | added | 9c850ee614224cf3cf0ad375758631f0848b3e725ab82784e39103d85869df24 | assert|test_exception_handling|# -*- coding: utf-8 -*- import ast from contextlib import suppress from wemake_python_styleguide.checker import Checker from wemake_python_styleguide.violations.system import InternalErrorViolation from wemake_python_styleguide.visitors.base import BaseNodeVisitor class _BrokenVisitor(Bas... | null | null | null |
wemake-services/wemake-python-styleguide | train | 334 | 83224285b0e4fd56aae94f43133e0b5fa07714f5 | train | tests/test_checker/test_exception_handling.py | train | wemake-services/wemake-python-styleguide:tests/test_checker/test_exception_handling.py | 30 | 4 | assert | test_exception_handling | # -*- coding: utf-8 -*-
import ast
from contextlib import suppress
from wemake_python_styleguide.checker import Checker
from wemake_python_styleguide.violations.system import InternalErrorViolation
from wemake_python_styleguide.visitors.base import BaseNodeVisitor
class _BrokenVisitor(BaseNodeVisitor):
def visi... | captured.out | modified | b48f3fabe44ef15fec21d9e4a11544df94318f61df90b8599fb1cf5f26eb161c | assert|test_exception_handling|# -*- coding: utf-8 -*- import ast from contextlib import suppress from wemake_python_styleguide.checker import Checker from wemake_python_styleguide.violations.system import InternalErrorViolation from wemake_python_styleguide.visitors.base import BaseNodeVisitor class _BrokenVisitor(Bas... | captured.out | 28 | 4 |
wemake-services/wemake-python-styleguide | train | 334 | 83224285b0e4fd56aae94f43133e0b5fa07714f5 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 238 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors | modified | 3e734320dd4ca8d0307273958d04033fbdc2261dcb6d35c90e41b2d6e8bfbad3 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors | 236 | 8 | |
wemake-services/wemake-python-styleguide | train | 334 | 83224285b0e4fd56aae94f43133e0b5fa07714f5 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 242 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors.get(found_error) | modified | 9e3e9c36302cad2e77b1f7231146046d33c21d2623973463e01fd5fc2066c753 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors.get(found_error) | 240 | 8 | |
wemake-services/wemake-python-styleguide | train | 334 | 83224285b0e4fd56aae94f43133e0b5fa07714f5 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 270 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | len(all_violations) | modified | 123f8ed13f0f52bf906e3bca25f5cd770097c0d796d39004fe4cc51aaf6a9dff | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wem... | len(all_violations) | 268 | 4 |
wemake-services/wemake-python-styleguide | train | 334 | 83224285b0e4fd56aae94f43133e0b5fa07714f5 | train | tests/test_violations/test_codes.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_codes.py | 20 | 12 | assert | test_all_violations_correct_numbers | # -*- coding: utf-8 -*-
def test_all_unique_violation_codes(all_violations):
"""Ensures that all violations have unique violation codes."""
codes = []
for violation in all_violations:
codes.append(int(violation.code))
assert len(set(codes)) == len(all_violations)
def test_all_violations_cor... | violation_class.code | modified | 3efff5245d9c88d9ba1fbdab3ad1e2be7272f4362fde65cbab5a7cd4989701be | assert|test_all_violations_correct_numbers|# -*- coding: utf-8 -*- def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [] for violation in all_violations: codes.append(int(violation.code)) assert len(set(codes)) == len(all_violations) def test_all_... | violation_class.code | 20 | 12 |
wemake-services/wemake-python-styleguide | train | 334 | 83224285b0e4fd56aae94f43133e0b5fa07714f5 | train | tests/test_violations/test_codes.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_codes.py | 32 | 8 | assert | test_violations_start_zero | # -*- coding: utf-8 -*-
def test_all_unique_violation_codes(all_violations):
"""Ensures that all violations have unique violation codes."""
codes = []
for violation in all_violations:
codes.append(int(violation.code))
assert len(set(codes)) == len(all_violations)
def test_all_violations_cor... | index * 100 | modified | 21969f3a485c3e8ff434af4c9d796320d99a21d89563c42cb274240064776eb3 | assert|test_violations_start_zero|# -*- coding: utf-8 -*- def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [] for violation in all_violations: codes.append(int(violation.code)) assert len(set(codes)) == len(all_violations) def test_all_violation... | (index + 1) * 100 | 32 | 8 |
wemake-services/wemake-python-styleguide | train | 334 | 83224285b0e4fd56aae94f43133e0b5fa07714f5 | train | tests/test_violations/test_codes.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_codes.py | 43 | 16 | assert | test_no_holes | # -*- coding: utf-8 -*-
def test_all_unique_violation_codes(all_violations):
"""Ensures that all violations have unique violation codes."""
codes = []
for violation in all_violations:
codes.append(int(violation.code))
assert len(set(codes)) == len(all_violations)
def test_all_violations_cor... | diff == 1 or diff > 2 | modified | 95fa27b56501d5597db55f747cccfe008256e3ff20451c5331f7c630bbb27365 | assert|test_no_holes|# -*- coding: utf-8 -*- def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [] for violation in all_violations: codes.append(int(violation.code)) assert len(set(codes)) == len(all_violations) def test_all_violations_correct_num... | diff == 1 or diff > 2 | 43 | 16 |
wemake-services/wemake-python-styleguide | train | 335 | df63e7dd9516e9fdea471dd944f15225a8153961 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 239 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors | modified | fec3a5bf289ee145ee16ca4db0a76d0ed453ab30c46688a0081ef795c650919b | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors | 238 | 8 | |
wemake-services/wemake-python-styleguide | train | 335 | df63e7dd9516e9fdea471dd944f15225a8153961 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 242 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors | modified | 180f829eb877acce76051499badb6cec491c94ccf219a17f33db0a60c9537855 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors | 241 | 8 | |
wemake-services/wemake-python-styleguide | train | 335 | df63e7dd9516e9fdea471dd944f15225a8153961 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 243 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors.get(found_error) | modified | 9bdcfa90891e235a5c0296a6e683268be261ffc35cf645b3b786e2a3363d017c | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors.get(found_error) | 242 | 8 | |
wemake-services/wemake-python-styleguide | train | 335 | df63e7dd9516e9fdea471dd944f15225a8153961 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 271 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | len(all_violations) | modified | 056e12cd6a9f1e73b19767da124fbae0d942b90454ba6c35a41f4b80b90bd7ff | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wem... | len(all_violations) | 270 | 4 |
wemake-services/wemake-python-styleguide | train | 335 | df63e7dd9516e9fdea471dd944f15225a8153961 | train | tests/test_visitors/test_ast/test_loops/test_loops/test_implicit_yield_from.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_loops/test_implicit_yield_from.py | 42 | 4 | assert_* | test_implicit_yield_from | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.refactoring import (
ImplicitYieldFromViolation,
)
from wemake_python_styleguide.visitors.ast.loops import (
WrongLoopDefinitionVisitor,
)
for_loop_template = """
def function():
for index in some:
{0}
"""
@pytest.ma... | [ImplicitYieldFromViolation]) | added | 9be263c8d3b18360c396df098e8838443ca7b1700e7a304fb965a671fec4734a | assert_*|test_implicit_yield_from|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( ImplicitYieldFromViolation, ) from wemake_python_styleguide.visitors.ast.loops import ( WrongLoopDefinitionVisitor, ) for_loop_template = """ def function(): for index in some: {0} """ @... | null | null | null |
wemake-services/wemake-python-styleguide | train | 335 | df63e7dd9516e9fdea471dd944f15225a8153961 | train | tests/test_visitors/test_ast/test_loops/test_loops/test_loop_sum.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_loops/test_loop_sum.py | 47 | 4 | assert_* | test_implicit_sum | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.refactoring import (
ImplicitSumViolation,
)
from wemake_python_styleguide.visitors.ast.loops import (
WrongLoopDefinitionVisitor,
)
for_loop_template = """
def function():
for index in some:
{0}
"""
@pytest.mark.par... | [ImplicitSumViolation]) | modified | 4f6f1c2c76f5b1fbe1f80188d92328ffd27a6865dd6b99d081c556a6d8423d92 | assert_*|test_implicit_sum|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.refactoring import ( ImplicitSumViolation, ) from wemake_python_styleguide.visitors.ast.loops import ( WrongLoopDefinitionVisitor, ) for_loop_template = """ def function(): for index in some: {0} """ @pytest.mark.p... | [ImplicitSumViolation]) | 48 | 4 |
wemake-services/wemake-python-styleguide | train | 336 | c34a3746c9d9d2879d7914d9230a2215f9ffe40d | train | tests/test_violations/test_docs.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_docs.py | 30 | 8 | assert | test_violation_template_ending | # -*- 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:
... | not violation.error_template.endswith('.') | added | f0ddd02f0eaefc3eac9a0ece35ba6fafbbe2e3d80fda71fa2bf80dd58b13becf | assert|test_violation_template_ending|# -*- 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 cl... | null | null | null |
wemake-services/wemake-python-styleguide | train | 336 | c34a3746c9d9d2879d7914d9230a2215f9ffe40d | train | tests/test_violations/test_docs.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_docs.py | 38 | 12 | assert | test_previous_codes_versionchanged | # -*- 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:
... | len(violation.previous_codes) | added | fa0a9de5ba433aff4ebc7269250bedfb4d2fa5b6ece6d23ae7fe8ee73c691cb2 | assert|test_previous_codes_versionchanged|# -*- 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 i... | null | null | null |
wemake-services/wemake-python-styleguide | train | 336 | c34a3746c9d9d2879d7914d9230a2215f9ffe40d | train | tests/test_violations/test_docs.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_docs.py | 55 | 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 | c1e5b3e4417f1df2824061be82f452e4eaf2d2c307df6bb264dac4c8d5c93f46 | 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 | 336 | c34a3746c9d9d2879d7914d9230a2215f9ffe40d | train | tests/test_violations/test_docs.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_docs.py | 56 | 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 | b2e795f21990baddb9856fb240843d30ff6680775d386a7c0763b4ca2650c5e3 | 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 | 53 | 8 |
wemake-services/wemake-python-styleguide | train | 336 | c34a3746c9d9d2879d7914d9230a2215f9ffe40d | train | tests/test_visitors/test_tokenize/test_keywords/test_keywords_spaces.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_keywords/test_keywords_spaces.py | 74 | 4 | assert_* | test_missing_space | # -*- coding: utf-8 -*-
import sys
import pytest
from wemake_python_styleguide.violations.consistency import (
MissingSpaceBetweenKeywordAndParenViolation,
)
from wemake_python_styleguide.visitors.tokenize.keywords import (
WrongKeywordTokenVisitor,
)
multiline_error_function = """
def foo():
yield(1, 2... | [MissingSpaceBetweenKeywordAndParenViolation]) | modified | 37d2a8653cf0f5c448e63cd0074dab8a489b547c2fd31306c5a9fb63b8367333 | assert_*|test_missing_space|# -*- coding: utf-8 -*- import sys import pytest from wemake_python_styleguide.violations.consistency import ( MissingSpaceBetweenKeywordAndParenViolation, ) from wemake_python_styleguide.visitors.tokenize.keywords import ( WrongKeywordTokenVisitor, ) multiline_error_function = """ def foo()... | [MissingSpaceBetweenKeywordAndParenViolation]) | 72 | 4 |
wemake-services/wemake-python-styleguide | train | 336 | c34a3746c9d9d2879d7914d9230a2215f9ffe40d | train | tests/test_visitors/test_tokenize/test_keywords/test_starts_with_dot.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_keywords/test_starts_with_dot.py | 64 | 4 | assert_* | test_wrong_dot_start | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
LineStartsWithDotViolation,
)
from wemake_python_styleguide.visitors.tokenize.keywords import (
WrongKeywordTokenVisitor,
)
# Correct:
correct_dot_attr = """
some_line = some.attr(
some.other,
)
"""
corr... | [LineStartsWithDotViolation]) | added | de03880173d4097b2672716e22988a5b24a4380a57984e4c0c068b9d0e91b5e6 | assert_*|test_wrong_dot_start|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( LineStartsWithDotViolation, ) from wemake_python_styleguide.visitors.tokenize.keywords import ( WrongKeywordTokenVisitor, ) # Correct: correct_dot_attr = """ some_line = some.attr( some.othe... | null | null | null |
wemake-services/wemake-python-styleguide | train | 337 | d101144d00825ae5d570978791796e95fa84fd84 | train | tests/test_visitors/test_ast/test_operators/test_useless_math.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_operators/test_useless_math.py | 60 | 4 | assert_* | test_zero_div | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
MeaninglessNumberOperationViolation,
ZeroDivisionViolation,
)
from wemake_python_styleguide.visitors.ast.operators import (
UselessOperatorsVisitor,
)
usage_template = 'constant {0}'
@pytest.mark.paramet... | [ZeroDivisionViolation]) | modified | d6837dbcb5a9d6a6bf5aaef3d29ae834b7eabc5a4f7351b62407b28ef93bbaa1 | assert_*|test_zero_div|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.mark.p... | [ZeroDivisionViolation]) | 58 | 4 |
wemake-services/wemake-python-styleguide | train | 337 | d101144d00825ae5d570978791796e95fa84fd84 | train | tests/test_visitors/test_ast/test_operators/test_useless_math.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_operators/test_useless_math.py | 100 | 4 | assert_* | test_meaningless_math | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
MeaninglessNumberOperationViolation,
ZeroDivisionViolation,
)
from wemake_python_styleguide.visitors.ast.operators import (
UselessOperatorsVisitor,
)
usage_template = 'constant {0}'
@pytest.mark.paramet... | [MeaninglessNumberOperationViolation]) | modified | 413b188c4e737d3967a054a8150bfb9d2b05feccbc25f855b410f68934b6133a | assert_*|test_meaningless_math|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytes... | [MeaninglessNumberOperationViolation]) | 98 | 4 |
wemake-services/wemake-python-styleguide | train | 337 | d101144d00825ae5d570978791796e95fa84fd84 | train | tests/test_visitors/test_ast/test_operators/test_useless_math.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_operators/test_useless_math.py | 217 | 4 | assert_* | test_divide_by_one | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
MeaninglessNumberOperationViolation,
ZeroDivisionViolation,
)
from wemake_python_styleguide.visitors.ast.operators import (
UselessOperatorsVisitor,
)
usage_template = 'constant {0}'
@pytest.mark.paramet... | [MeaninglessNumberOperationViolation]) | added | 03b815a40dcdcd1837048c4c3ea6e9077bd6d4ae5877ab115ddca927f1f41f22 | assert_*|test_divide_by_one|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.m... | null | null | null |
wemake-services/wemake-python-styleguide | train | 337 | d101144d00825ae5d570978791796e95fa84fd84 | train | tests/test_visitors/test_tokenize/test_keywords/test_keywords_spaces.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_keywords/test_keywords_spaces.py | 74 | 4 | assert_* | test_missing_space | # -*- coding: utf-8 -*-
import sys
import pytest
from wemake_python_styleguide.violations.consistency import (
MissingSpaceBetweenKeywordAndParenViolation,
)
from wemake_python_styleguide.visitors.tokenize.syntax import (
WrongKeywordTokenVisitor,
)
multiline_error_function = """
def foo():
yield(1, 2, ... | [MissingSpaceBetweenKeywordAndParenViolation]) | modified | fa569c21a2f1ce6ffc51385b4e5c5fe4c865f030a0bd79e02e3ddc3831a77856 | assert_*|test_missing_space|# -*- coding: utf-8 -*- import sys import pytest from wemake_python_styleguide.violations.consistency import ( MissingSpaceBetweenKeywordAndParenViolation, ) from wemake_python_styleguide.visitors.tokenize.syntax import ( WrongKeywordTokenVisitor, ) multiline_error_function = """ def foo(): ... | [MissingSpaceBetweenKeywordAndParenViolation]) | 74 | 4 |
wemake-services/wemake-python-styleguide | train | 337 | d101144d00825ae5d570978791796e95fa84fd84 | train | tests/test_visitors/test_tokenize/test_keywords/test_starts_with_dot.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_keywords/test_starts_with_dot.py | 64 | 4 | assert_* | test_wrong_dot_start | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
LineStartsWithDotViolation,
)
from wemake_python_styleguide.visitors.tokenize.syntax import (
WrongKeywordTokenVisitor,
)
# Correct:
correct_dot_attr = """
some_line = some.attr(
some.other,
)
"""
correc... | [LineStartsWithDotViolation]) | modified | fb77869cd3873528f9025baa50f7e26360d933c0b629768c7e7c49ed51c4f24a | assert_*|test_wrong_dot_start|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( LineStartsWithDotViolation, ) from wemake_python_styleguide.visitors.tokenize.syntax import ( WrongKeywordTokenVisitor, ) # Correct: correct_dot_attr = """ some_line = some.attr( some.other,... | [LineStartsWithDotViolation]) | 64 | 4 |
wemake-services/wemake-python-styleguide | train | 338 | d8b4fae37c21cc5eff83e23e998e38ae9456e5b2 | train | tests/test_visitors/test_ast/test_operators/test_useless_math.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_operators/test_useless_math.py | 114 | 4 | assert_* | test_meaningless_math | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
MeaninglessNumberOperationViolation,
ZeroDivisionViolation,
)
from wemake_python_styleguide.visitors.ast.operators import (
UselessOperatorsVisitor,
)
usage_template = 'constant {0}'
@pytest.mark.paramet... | [MeaninglessNumberOperationViolation]) | added | b93bbb86144dddefb8d4280404b68cf14c0b6342373ca59330f8653de1a9bf6c | assert_*|test_meaningless_math|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytes... | null | null | null |
wemake-services/wemake-python-styleguide | train | 338 | d8b4fae37c21cc5eff83e23e998e38ae9456e5b2 | train | tests/test_visitors/test_ast/test_operators/test_useless_math.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_operators/test_useless_math.py | 245 | 4 | assert_* | test_divide_by_one | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
MeaninglessNumberOperationViolation,
ZeroDivisionViolation,
)
from wemake_python_styleguide.visitors.ast.operators import (
UselessOperatorsVisitor,
)
usage_template = 'constant {0}'
@pytest.mark.paramet... | [MeaninglessNumberOperationViolation]) | added | 9e413e526f1a504ca2b99853b84e65c2aff334a1308b4e06003114f9e83a87dc | assert_*|test_divide_by_one|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( MeaninglessNumberOperationViolation, ZeroDivisionViolation, ) from wemake_python_styleguide.visitors.ast.operators import ( UselessOperatorsVisitor, ) usage_template = 'constant {0}' @pytest.m... | null | null | null |
wemake-services/wemake-python-styleguide | train | 339 | 7723d2d945d5078ed63d473f9813045d92452d4c | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 250 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors | added | bda8cf438a153734c37e0406ff9f7a9c514611bb67285cae5a290b40b1817da7 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | null | null | null | |
wemake-services/wemake-python-styleguide | train | 339 | 7723d2d945d5078ed63d473f9813045d92452d4c | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 251 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors.get(found_error) | added | 5c7baf2c0331f1004ae29bd517d74261e7afd0d9b912d74d6339ff1b304d0449 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | null | null | null | |
wemake-services/wemake-python-styleguide | train | 339 | 7723d2d945d5078ed63d473f9813045d92452d4c | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 279 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | len(all_violations) | added | b71e6cfc8036664478c6e0b505794530597012630b768f2e72e099b28a44e213 | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wem... | null | null | null |
wemake-services/wemake-python-styleguide | train | 339 | 7723d2d945d5078ed63d473f9813045d92452d4c | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 309 | 4 | assert | test_noqa_fixture_disabled_no_control | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | len(all_controlled_violations) | added | 5c57c3b1acf8062890c6b69c85093b81a49c00e9f6dbdae5d827393f22be8c1b | assert|test_noqa_fixture_disabled_no_control|# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 340 | 02a934cbdec1a2fc488a893cd1bdb96902e4bbbd | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 243 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors | added | 10c556e9acce9f59c8699db9fae1c19458186ddd516590f859ac5adfd7ce42d5 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | null | null | null | |
wemake-services/wemake-python-styleguide | train | 340 | 02a934cbdec1a2fc488a893cd1bdb96902e4bbbd | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 247 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors.get(found_error) | modified | 18cde117c686e2581b8d6db10782e3eb4d12e96750b665359b07bfa17dcd0849 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors | 250 | 8 | |
wemake-services/wemake-python-styleguide | train | 340 | 02a934cbdec1a2fc488a893cd1bdb96902e4bbbd | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 275 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | len(all_violations) | added | e32a0e957346689efc10d827c1a98fcea8036b3c06e318e43f3c4aea4f47e660 | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wem... | null | null | null |
wemake-services/wemake-python-styleguide | train | 340 | 02a934cbdec1a2fc488a893cd1bdb96902e4bbbd | train | tests/test_checker/test_presets.py | train | wemake-services/wemake-python-styleguide:tests/test_checker/test_presets.py | 74 | 8 | assert | test_all_visitors_contained_in_checker | # -*- coding: utf-8 -*-
import importlib
import inspect
from importlib.machinery import SourceFileLoader
from operator import itemgetter
from pathlib import Path
import pytest
from wemake_python_styleguide.checker import Checker
from wemake_python_styleguide.visitors.base import (
BaseFilenameVisitor,
BaseNo... | checker_visitors | modified | 9278cdc4ec30cb00903a22c5b36fd6edbafbeae61a07e4f6d5013b4ed6f7655a | assert|test_all_visitors_contained_in_checker|# -*- coding: utf-8 -*- import importlib import inspect from importlib.machinery import SourceFileLoader from operator import itemgetter from pathlib import Path import pytest from wemake_python_styleguide.checker import Checker from wemake_python_styleguide.visitors.base i... | checker_visitors | 74 | 8 |
wemake-services/wemake-python-styleguide | train | 340 | 02a934cbdec1a2fc488a893cd1bdb96902e4bbbd | train | tests/test_checker/test_presets.py | train | wemake-services/wemake-python-styleguide:tests/test_checker/test_presets.py | 76 | 4 | assert | test_all_visitors_contained_in_checker | # -*- coding: utf-8 -*-
import importlib
import inspect
from importlib.machinery import SourceFileLoader
from operator import itemgetter
from pathlib import Path
import pytest
from wemake_python_styleguide.checker import Checker
from wemake_python_styleguide.visitors.base import (
BaseFilenameVisitor,
BaseNo... | len(checker_visitors) | modified | 3bddca8d945608b8f0046d1ea55ae0505b76f2826ae1a4f383da44450bb4ae4f | assert|test_all_visitors_contained_in_checker|# -*- coding: utf-8 -*- import importlib import inspect from importlib.machinery import SourceFileLoader from operator import itemgetter from pathlib import Path import pytest from wemake_python_styleguide.checker import Checker from wemake_python_styleguide.visitors.base i... | len(checker_visitors) | 76 | 4 |
wemake-services/wemake-python-styleguide | train | 340 | 02a934cbdec1a2fc488a893cd1bdb96902e4bbbd | train | tests/test_violations/test_codes.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_codes.py | 20 | 12 | assert | test_all_violations_correct_numbers | # -*- coding: utf-8 -*-
def test_all_unique_violation_codes(all_violations):
"""Ensures that all violations have unique violation codes."""
codes = []
for violation in all_violations:
codes.append(int(violation.code))
assert len(set(codes)) == len(all_violations)
def test_all_violations_cor... | violation_class.code | modified | d46222625f14f110d9bb2edd748fe974cd405c936b9ccd648b3cee173c018292 | assert|test_all_violations_correct_numbers|# -*- coding: utf-8 -*- def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [] for violation in all_violations: codes.append(int(violation.code)) assert len(set(codes)) == len(all_violations) def test_all_... | violation_class.code | 20 | 12 |
wemake-services/wemake-python-styleguide | train | 340 | 02a934cbdec1a2fc488a893cd1bdb96902e4bbbd | train | tests/test_violations/test_codes.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_codes.py | 32 | 8 | assert | test_violations_start_zero | # -*- coding: utf-8 -*-
def test_all_unique_violation_codes(all_violations):
"""Ensures that all violations have unique violation codes."""
codes = []
for violation in all_violations:
codes.append(int(violation.code))
assert len(set(codes)) == len(all_violations)
def test_all_violations_cor... | index * 100 | modified | 1c885efa52e7eff3175326a37b387abd2940fbe8f14bcb9b5c593031266fbbca | assert|test_violations_start_zero|# -*- coding: utf-8 -*- def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [] for violation in all_violations: codes.append(int(violation.code)) assert len(set(codes)) == len(all_violations) def test_all_violation... | index * 100 | 32 | 8 |
wemake-services/wemake-python-styleguide | train | 340 | 02a934cbdec1a2fc488a893cd1bdb96902e4bbbd | train | tests/test_violations/test_codes.py | train | wemake-services/wemake-python-styleguide:tests/test_violations/test_codes.py | 43 | 16 | assert | test_no_holes | # -*- coding: utf-8 -*-
def test_all_unique_violation_codes(all_violations):
"""Ensures that all violations have unique violation codes."""
codes = []
for violation in all_violations:
codes.append(int(violation.code))
assert len(set(codes)) == len(all_violations)
def test_all_violations_cor... | diff == 1 or diff > 2 | modified | 6befea062a6f3009a22f9aacbfc78bccfd2495fc2337810da6d44d67df0c3062 | assert|test_no_holes|# -*- coding: utf-8 -*- def test_all_unique_violation_codes(all_violations): """Ensures that all violations have unique violation codes.""" codes = [] for violation in all_violations: codes.append(int(violation.code)) assert len(set(codes)) == len(all_violations) def test_all_violations_correct_num... | diff == 1 or diff > 2 | 43 | 16 |
wemake-services/wemake-python-styleguide | train | 341 | 29f7c9686a6293e059d2d50f804394127f8fa318 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 247 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors | modified | 7e21fc0ead6acc7e009faa0c52b6961adb4b675a59c490202ce532ff45b5f382 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors | 246 | 8 | |
wemake-services/wemake-python-styleguide | train | 341 | 29f7c9686a6293e059d2d50f804394127f8fa318 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 248 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors.get(found_error) | modified | 715d6eb97481cc5b40e1c06799cd6dc8504b29bc3228a055430a3086037ebacb | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors.get(found_error) | 247 | 8 | |
wemake-services/wemake-python-styleguide | train | 341 | 29f7c9686a6293e059d2d50f804394127f8fa318 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 276 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | len(all_violations) | modified | 6603be3290f0b8f7ffde2b030fa0a373c8f71e0aa069109b700196611339b14b | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wem... | len(all_violations) | 275 | 4 |
wemake-services/wemake-python-styleguide | train | 341 | 29f7c9686a6293e059d2d50f804394127f8fa318 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 306 | 4 | assert | test_noqa_fixture_disabled_no_control | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | len(all_controlled_violations) | modified | 9b26e6a5cc6181ec76936c725281e039220da90bb4915f965d81d7bbba14b84d | assert|test_noqa_fixture_disabled_no_control|# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: ... | len(all_controlled_violations) | 305 | 4 |
wemake-services/wemake-python-styleguide | train | 341 | 29f7c9686a6293e059d2d50f804394127f8fa318 | train | tests/test_visitors/test_ast/test_exceptions/test_base_exception.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_exceptions/test_base_exception.py | 49 | 4 | assert_* | test_use_base_exception | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
BaseExceptionViolation,
)
from wemake_python_styleguide.visitors.ast.exceptions import (
WrongExceptHandlerVisitor,
)
use_base_exception = """
try:
...
except BaseException:
...
"""
use_except_exce... | [BaseExceptionViolation]) | modified | da5a9fed1b78e16c359558ebb59fbb0c37b23f7716939b22bda2c7102c038b85 | assert_*|test_use_base_exception|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BaseExceptionViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongExceptHandlerVisitor, ) use_base_exception = """ try: ... except BaseException: ... """ us... | [BaseExceptionViolation]) | 49 | 4 |
wemake-services/wemake-python-styleguide | train | 341 | 29f7c9686a6293e059d2d50f804394127f8fa318 | train | tests/test_visitors/test_ast/test_exceptions/test_exception_order.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_exceptions/test_exception_order.py | 94 | 4 | assert_* | test_wrong_order_exception | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
IncorrectExceptOrderViolation,
)
from wemake_python_styleguide.visitors.ast.exceptions import (
WrongTryExceptVisitor,
)
exception_template = """
try:
...
except {0}:
...
except {1}:
...
"""
cu... | [IncorrectExceptOrderViolation]) | added | 3ac69b3803fcf1781ebe359306c962a11db2a815add8b20bdd92a0a0a134f89a | assert_*|test_wrong_order_exception|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( IncorrectExceptOrderViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongTryExceptVisitor, ) exception_template = """ try: ... except {0}: ... except {1}... | null | null | null |
wemake-services/wemake-python-styleguide | train | 341 | 29f7c9686a6293e059d2d50f804394127f8fa318 | train | tests/test_visitors/test_ast/test_exceptions/test_useless_except_case.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_exceptions/test_useless_except_case.py | 90 | 4 | assert_* | test_useless_except_case | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
UselessExceptCaseViolation,
)
from wemake_python_styleguide.visitors.ast.exceptions import (
WrongExceptHandlerVisitor,
)
right_empty_bare_except = """
try:
...
except:
...
"""
right_logging_except = ... | [UselessExceptCaseViolation]) | modified | a3b97a461ebd0d9bdc09706b5ea71ba6a133e2889b31af168fed1ea7558ac52e | assert_*|test_useless_except_case|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( UselessExceptCaseViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongExceptHandlerVisitor, ) right_empty_bare_except = """ try: ... except: ... """ right_log... | [UselessExceptCaseViolation]) | 90 | 4 |
wemake-services/wemake-python-styleguide | train | 342 | edaaa14582a2df1d36c317a74fd7bf6d78cef69c | train | tests/test_visitors/test_ast/test_blocks/test_overlap/test_blocks_overlap.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_blocks/test_overlap/test_blocks_overlap.py | 133 | 4 | assert_* | test_block_overlap | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
BlockAndLocalOverlapViolation,
)
from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor
# Wrong:
import_and_class1 = """
import overlap
class overlap: ...
"""
import_and_class2 = """
c... | [BlockAndLocalOverlapViolation]) | added | 51ad16220e1115fd5f07b111c40dd2cdb397bed5e0173c2dbf83d19f7ee80084 | assert_*|test_block_overlap|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BlockAndLocalOverlapViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Wrong: import_and_class1 = """ import overlap class overlap: ... """ import_... | null | null | null |
wemake-services/wemake-python-styleguide | train | 342 | edaaa14582a2df1d36c317a74fd7bf6d78cef69c | train | tests/test_visitors/test_ast/test_blocks/test_overlap/test_blocks_overlap.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_blocks/test_overlap/test_blocks_overlap.py | 134 | 4 | assert_* | test_block_overlap | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
BlockAndLocalOverlapViolation,
)
from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor
# Wrong:
import_and_class1 = """
import overlap
class overlap: ...
"""
import_and_class2 = """
c... | 'overlap') | added | 0ee990f50305e9e84f60840f0a895fac802e2fbec6ec504ea68968235132453b | assert_*|test_block_overlap|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BlockAndLocalOverlapViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Wrong: import_and_class1 = """ import overlap class overlap: ... """ import_... | null | null | null |
wemake-services/wemake-python-styleguide | train | 342 | edaaa14582a2df1d36c317a74fd7bf6d78cef69c | train | tests/test_visitors/test_ast/test_blocks/test_overlap/test_class_block.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_blocks/test_overlap/test_class_block.py | 64 | 4 | assert_* | test_class_block_overlap | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
BlockAndLocalOverlapViolation,
)
from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor
# Classes:
class_def1 = 'class {0}():'
class_def2 = 'class {0}(object):'
class_def3 = 'class {0}:'... | [BlockAndLocalOverlapViolation]) | modified | 8b497316a6f43eeb944de3f28c758d24eb3416a6a6b49812c8729068057566d7 | assert_*|test_class_block_overlap|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BlockAndLocalOverlapViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Classes: class_def1 = 'class {0}():' class_def2 = 'class {0}(object):'... | [BlockAndLocalOverlapViolation]) | 64 | 4 |
wemake-services/wemake-python-styleguide | train | 342 | edaaa14582a2df1d36c317a74fd7bf6d78cef69c | train | tests/test_visitors/test_ast/test_blocks/test_overlap/test_class_block.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_blocks/test_overlap/test_class_block.py | 100 | 4 | assert_* | test_class_internals_overlap | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
BlockAndLocalOverlapViolation,
)
from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor
# Classes:
class_def1 = 'class {0}():'
class_def2 = 'class {0}(object):'
class_def3 = 'class {0}:'... | [BlockAndLocalOverlapViolation]) | modified | 7818c36eba926da06fd5d9b63a25f7974661655d18203c280a22f4089895b44a | assert_*|test_class_internals_overlap|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BlockAndLocalOverlapViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Classes: class_def1 = 'class {0}():' class_def2 = 'class {0}(objec... | [BlockAndLocalOverlapViolation]) | 100 | 4 |
wemake-services/wemake-python-styleguide | train | 342 | edaaa14582a2df1d36c317a74fd7bf6d78cef69c | train | tests/test_visitors/test_ast/test_blocks/test_overlap/test_function_block.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_blocks/test_overlap/test_function_block.py | 242 | 4 | assert_* | test_no_function_overload | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
BlockAndLocalOverlapViolation,
)
from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor
# Functions:
function_def1 = 'def {0}():'
# Wrong usages:
function_template1 = """
{0}
...
... | [BlockAndLocalOverlapViolation]) | modified | 3a023c5619a750b90fd5b385993f1aee5590fd58e0d295d1a566b09319c849a0 | assert_*|test_no_function_overload|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BlockAndLocalOverlapViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Functions: function_def1 = 'def {0}():' # Wrong usages: function_temp... | [BlockAndLocalOverlapViolation]) | 242 | 4 |
wemake-services/wemake-python-styleguide | train | 342 | edaaa14582a2df1d36c317a74fd7bf6d78cef69c | train | tests/test_visitors/test_ast/test_blocks/test_overlap/test_import_block.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_blocks/test_overlap/test_import_block.py | 71 | 4 | assert_* | test_import_block_overlap | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
BlockAndLocalOverlapViolation,
)
from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor
# Imports:
import_block = 'import {0}'
import_block_as = 'import some as {0}'
from_import_block = ... | [BlockAndLocalOverlapViolation]) | modified | 78bf3628813ba6eaed05e06743dc90769cd618d40acb46d44242f59c19fdc487 | assert_*|test_import_block_overlap|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BlockAndLocalOverlapViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Imports: import_block = 'import {0}' import_block_as = 'import some a... | [BlockAndLocalOverlapViolation]) | 71 | 4 |
wemake-services/wemake-python-styleguide | train | 342 | edaaa14582a2df1d36c317a74fd7bf6d78cef69c | train | tests/test_visitors/test_ast/test_blocks/test_overlap/test_loop_blocks.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_blocks/test_overlap/test_loop_blocks.py | 82 | 4 | assert_* | test_for_block_overlap | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
BlockAndLocalOverlapViolation,
)
from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor
# Loops:
for_loop1 = 'for {0} in some():'
for_loop2 = 'for {0}, second in some():'
for_loop3 = 'fo... | [BlockAndLocalOverlapViolation]) | modified | c41e8c70eebad7ce8d21fdda4ff5fc6811d24f7273d2616fe56a14c5bc48b36e | assert_*|test_for_block_overlap|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BlockAndLocalOverlapViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Loops: for_loop1 = 'for {0} in some():' for_loop2 = 'for {0}, second in ... | [BlockAndLocalOverlapViolation]) | 82 | 4 |
wemake-services/wemake-python-styleguide | train | 342 | edaaa14582a2df1d36c317a74fd7bf6d78cef69c | train | tests/test_visitors/test_ast/test_blocks/test_overlap/test_with_block.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_blocks/test_overlap/test_with_block.py | 86 | 4 | assert_* | test_with_block_overlap | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
BlockAndLocalOverlapViolation,
)
from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor
# Context managers:
with1 = 'with open() as {0}:'
with2 = 'with open() as ({0}, second):'
with3 = ... | [BlockAndLocalOverlapViolation]) | modified | 2cedb562fe93e68612f867ca4270de7451ebc34461adf1f5a54fc843b088effd | assert_*|test_with_block_overlap|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( BlockAndLocalOverlapViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Context managers: with1 = 'with open() as {0}:' with2 = 'with open() as... | [BlockAndLocalOverlapViolation]) | 86 | 4 |
wemake-services/wemake-python-styleguide | train | 343 | bde97523a1c5e72e4fe16727e6688fbd9318f359 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 245 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors | modified | 4c6b6215b92e89c70bdd8424f2cb3bd2c26117c82eeed6d6f80f630a6c8500f6 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors | 244 | 8 | |
wemake-services/wemake-python-styleguide | train | 343 | bde97523a1c5e72e4fe16727e6688fbd9318f359 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 249 | 8 | assert | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | errors.get(found_error) | modified | 999c8a92ef2791d8814e565eb07da80e2f45fb0178bd7c04c9f0dec8866682e2 | assert||# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/... | errors.get(found_error) | 248 | 8 | |
wemake-services/wemake-python-styleguide | train | 343 | bde97523a1c5e72e4fe16727e6688fbd9318f359 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 277 | 4 | assert | test_noqa_fixture_disabled | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | len(all_violations) | modified | 3f505f0a4ba578ff047448626ef4e05f711d83ac08e497a0e930e7501263d0b2 | assert|test_noqa_fixture_disabled|# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wem... | len(all_violations) | 276 | 4 |
wemake-services/wemake-python-styleguide | train | 343 | bde97523a1c5e72e4fe16727e6688fbd9318f359 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 307 | 4 | assert | test_noqa_fixture_disabled_no_control | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | len(all_controlled_violations) | modified | 73ec07c64b228b1173b8cb7ca4c0a2de9eccfb49e3e572ffde29021c9ee57bd3 | assert|test_noqa_fixture_disabled_no_control|# -*- coding: utf-8 -*- """ Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: ... | len(all_controlled_violations) | 306 | 4 |
wemake-services/wemake-python-styleguide | train | 343 | bde97523a1c5e72e4fe16727e6688fbd9318f359 | train | tests/test_visitors/test_ast/test_statements/test_not_tuple_argument.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_statements/test_not_tuple_argument.py | 68 | 4 | assert_* | test_no_passed | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.constants import TUPLE_ARGUMENTS_METHODS
from wemake_python_styleguide.violations.refactoring import (
NotATupleArgumentViolation,
)
from wemake_python_styleguide.visitors.ast.statements import (
WrongMethodArgumentsVisitor,
)
@pytest.mark.... | [NotATupleArgumentViolation]) | added | 9a1a443b584f3f6cf69c880e751bf87fdf621b156ec6c3a06d0bce08f4614e22 | assert_*|test_no_passed|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.constants import TUPLE_ARGUMENTS_METHODS from wemake_python_styleguide.violations.refactoring import ( NotATupleArgumentViolation, ) from wemake_python_styleguide.visitors.ast.statements import ( WrongMethodArgumentsVisitor, ) @... | null | null | null |
wemake-services/wemake-python-styleguide | train | 344 | 43b91f8af14d20f5913d4b1e9f767681bc94f3a7 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 154 | 4 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from some import _protected # noqa: WPS436
from .version import get_version # noqa: WPS300
... | test_function(2) | modified | 26bd519ff730bcb02ffc876686a2c9fbe157e79a840f8968b0a057e0e10219d7 | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ful... | test_function(2) | 154 | 4 | |
wemake-services/wemake-python-styleguide | train | 344 | 43b91f8af14d20f5913d4b1e9f767681bc94f3a7 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 156 | 4 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from some import _protected # noqa: WPS436
from .version import get_version # noqa: WPS300
... | test_function(4) | modified | 2f1f6eda07fdedc41ddfd83ec35ba2e3124484d43322f819ba378b0a8230c949 | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ful... | test_function(4) | 156 | 4 | |
wemake-services/wemake-python-styleguide | train | 344 | 43b91f8af14d20f5913d4b1e9f767681bc94f3a7 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 157 | 4 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from some import _protected # noqa: WPS436
from .version import get_version # noqa: WPS300
... | test_function(5) | modified | 71acdb0064c89de6eda9f956b99c99e6a7f50baba7bab730ffec4c8f1b31c186 | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ful... | test_function(5) | 157 | 4 | |
wemake-services/wemake-python-styleguide | train | 344 | 43b91f8af14d20f5913d4b1e9f767681bc94f3a7 | train | tests/fixtures/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa.py | 231 | 0 | assert | # -*- coding: utf-8 -*-
"""
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from some import _protected # noqa: WPS436
from .version import get_version # noqa: WPS300
... | octal_number | modified | 96ba574ae6192cbe00220eee956f0e50c17be8c7a971d181775682accedff9ff | assert||# -*- coding: utf-8 -*- """ This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from some import _protected # noqa: WPS436 from .version import get_version # noqa: WPS300 ful... | octal_number | 231 | 0 | |
wemake-services/wemake-python-styleguide | train | 344 | 43b91f8af14d20f5913d4b1e9f767681bc94f3a7 | train | tests/test_visitors/test_ast/test_keywords/test_keyword_condition.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_keyword_condition.py | 65 | 4 | assert_* | test_false_condition_keywords | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
WrongKeywordConditionViolation,
)
from wemake_python_styleguide.visitors.ast.keywords import (
ConstantKeywordVisitor,
)
while_template = """
while {0}:
...
"""
assert_template = 'assert {0}'
assert_wi... | [WrongKeywordConditionViolation]) | added | 82b2afd63e161f71818c148cb55d9c6a37604f71ea80a32fcde1cab1f775d167 | assert_*|test_false_condition_keywords|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongKeywordConditionViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConstantKeywordVisitor, ) while_template = """ while {0}: ... """ assert_template =... | null | null | null |
wemake-services/wemake-python-styleguide | train | 344 | 43b91f8af14d20f5913d4b1e9f767681bc94f3a7 | train | tests/test_visitors/test_ast/test_keywords/test_keyword_condition.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_keywords/test_keyword_condition.py | 88 | 4 | assert_* | test_false_assert_condition_keywords | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.best_practices import (
WrongKeywordConditionViolation,
)
from wemake_python_styleguide.visitors.ast.keywords import (
ConstantKeywordVisitor,
)
while_template = """
while {0}:
...
"""
assert_template = 'assert {0}'
assert_wi... | [WrongKeywordConditionViolation]) | added | 5219120852d5941ecc395cff483b8aba45c36a2fb1d2c95186271ae39165de8c | assert_*|test_false_assert_condition_keywords|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.best_practices import ( WrongKeywordConditionViolation, ) from wemake_python_styleguide.visitors.ast.keywords import ( ConstantKeywordVisitor, ) while_template = """ while {0}: ... """ assert_tem... | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.