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 | 476 | 9dd22ac258f6a6179d46aff7c6bd0f72c797d772 | train | tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_string_multiline.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_string_multiline.py | 78 | 4 | assert_* | test_incorrect_multiline_strings | import pytest
from wemake_python_styleguide.violations.consistency import (
RawStringNotNeededViolation,
WrongMultilineStringViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongStringTokenVisitor,
)
multiline_single = """'''
abc
'''"""
multiline_double = '''"""
abc
"""''... | [WrongMultilineStringViolation]) | modified | 23db3a4b7fd06d4fdbd9b191d7f8ad98bd68624b02ae567973313c549351261a | assert_*|test_incorrect_multiline_strings|import pytest from wemake_python_styleguide.violations.consistency import ( RawStringNotNeededViolation, WrongMultilineStringViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) multiline_single = """''' abc '''""" multilin... | [WrongMultilineStringViolation]) | 77 | 4 |
wemake-services/wemake-python-styleguide | train | 476 | 9dd22ac258f6a6179d46aff7c6bd0f72c797d772 | train | tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_unicode_prefix.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_unicode_prefix.py | 75 | 4 | assert_* | test_unicode_regression | import pytest
from wemake_python_styleguide.violations.consistency import (
UnicodeStringViolation,
UppercaseStringModifierViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongStringTokenVisitor,
)
@pytest.mark.parametrize('primitive', [
'u"text"',
"u'unicode'",
... | [ UnicodeStringViolation, UppercaseStringModifierViolation, ]) | modified | 4686175ea1a6d170c9c6bf7ff3f47e5f4c780b20b213eb559ff8963fb5895a60 | assert_*|test_unicode_regression|import pytest from wemake_python_styleguide.violations.consistency import ( UnicodeStringViolation, UppercaseStringModifierViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @pytest.mark.parametrize('primitive', [ 'u"text"', "u'un... | [ UnicodeStringViolation, UppercaseStringModifierViolation, ]) | 75 | 4 |
wemake-services/wemake-python-styleguide | train | 476 | 9dd22ac258f6a6179d46aff7c6bd0f72c797d772 | train | tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_unnecessary_raw_strings.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_unnecessary_raw_strings.py | 58 | 4 | assert_* | test_unnecessary_raw_string | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.consistency import (
RawStringNotNeededViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongStringTokenVisitor,
)
@pytest.mark.parametrize('raw_strings', [
r"r'some text\\'",
r"r'some text... | [RawStringNotNeededViolation]) | added | 812a86952db60ecaf3947902037064d92d1e085c95604d40939a39bef784f1de | assert_*|test_unnecessary_raw_string|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.consistency import ( RawStringNotNeededViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @pytest.mark.parametrize('raw_strings', [ r"r'some text\\... | null | null | null |
wemake-services/wemake-python-styleguide | train | 477 | 482194d45d125598210f2d68b477964e8cb74dc3 | train | tests/fixtures/noqa/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa/noqa.py | 247 | 4 | assert | """
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
from typing import List
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from _some import protected # noqa: WPS436
from some import _protected # noqa: WPS450
from ... | test_function(3) | modified | 5d8456b2ba31928738e6a3072b36cf7b98f6687aceb529a0ee950853c9d1a463 | assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from foo... | test_function(3) | 244 | 4 | |
wemake-services/wemake-python-styleguide | train | 477 | 482194d45d125598210f2d68b477964e8cb74dc3 | train | tests/fixtures/noqa/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa/noqa.py | 250 | 4 | assert | """
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
from typing import List
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from _some import protected # noqa: WPS436
from some import _protected # noqa: WPS450
from ... | test_function(6) | modified | 239a5f4bc86f1d1a307a575dd9020cc9ae2e60e770226e1f2ffb9cac0b9ef61d | assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from foo... | test_function(6) | 247 | 4 | |
wemake-services/wemake-python-styleguide | train | 477 | 482194d45d125598210f2d68b477964e8cb74dc3 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 305 | 12 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors | modified | 9e029d5be139781a71b09edce5f06ba7b0193d08598bf9fa6b72286a39fe8c11 | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors | 304 | 12 | |
wemake-services/wemake-python-styleguide | train | 477 | 482194d45d125598210f2d68b477964e8cb74dc3 | train | tests/test_checker/test_presets.py | train | wemake-services/wemake-python-styleguide:tests/test_checker/test_presets.py | 73 | 4 | assert | test_all_visitors_contained_in_checker | import importlib
import inspect
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,
BaseNodeVisitor,
BaseTokenVisitor,
BaseVisitor,
)
def _is_visitor_clas... | len(checker_visitors) | modified | e4a051e25e5fe9db946667b42f02c0f8d8ae733b9e3990a67051bc62e4c3b9c8 | assert|test_all_visitors_contained_in_checker|import importlib import inspect 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, BaseNodeVisitor, BaseTokenVisitor, BaseVisit... | len(checker_visitors) | 74 | 4 |
wemake-services/wemake-python-styleguide | train | 477 | 482194d45d125598210f2d68b477964e8cb74dc3 | train | tests/test_visitors/test_ast/test_imports/test_imports_collision.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_imports/test_imports_collision.py | 138 | 4 | assert_* | test_imports_collision | import pytest
from wemake_python_styleguide.violations.best_practices import (
ImportCollisionViolation,
)
from wemake_python_styleguide.violations.consistency import (
DottedRawImportViolation,
LocalFolderImportViolation,
)
from wemake_python_styleguide.visitors.ast.imports import WrongImportVisitor
# Co... | [ImportCollisionViolation]) | added | 17fdc12c9ad358591e32c781a612016b2e18f950327913711f0022103e3fed24 | assert_*|test_imports_collision|import pytest from wemake_python_styleguide.violations.best_practices import ( ImportCollisionViolation, ) from wemake_python_styleguide.violations.consistency import ( DottedRawImportViolation, LocalFolderImportViolation, ) from wemake_python_styleguide.visitors.ast.imports import Wrong... | null | null | null |
wemake-services/wemake-python-styleguide | train | 477 | 482194d45d125598210f2d68b477964e8cb74dc3 | train | tests/test_visitors/test_ast/test_loops/test_loops/test_infinite_while_loops.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_loops/test_infinite_while_loops.py | 157 | 4 | assert_* | test_wrong_while_loops | import pytest
from wemake_python_styleguide.violations.best_practices import (
InfiniteWhileLoopViolation,
)
from wemake_python_styleguide.visitors.ast.loops import WrongLoopVisitor
template_simple = """
while True:
{0}
"""
template_nested_while1 = """
while True:
while other:
{0}
{0}
"""
te... | [InfiniteWhileLoopViolation]) | modified | 05ab0d06171812803e8e20bc64b78447711defc24d5f91e649afa1c2c183ff0e | assert_*|test_wrong_while_loops|import pytest from wemake_python_styleguide.violations.best_practices import ( InfiniteWhileLoopViolation, ) from wemake_python_styleguide.visitors.ast.loops import WrongLoopVisitor template_simple = """ while True: {0} """ template_nested_while1 = """ while True: while other: {0} {0} ""... | [InfiniteWhileLoopViolation]) | 159 | 4 |
wemake-services/wemake-python-styleguide | train | 477 | 482194d45d125598210f2d68b477964e8cb74dc3 | train | tests/test_visitors/test_tokenize/test_comments/test_shebang.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_shebang.py | 214 | 4 | assert_* | test_wrong_shebang_format | import pytest
from wemake_python_styleguide.violations.best_practices import ShebangViolation
from wemake_python_styleguide.visitors.tokenize import comments
template_empty = ''
template_newlines = '\n\n'
template_regular = '{0}'
template_with_leading_comment = """{0}
# some other
"""
template_regular_comment = 'x ... | [ShebangViolation]) | modified | 9b7cd19e231b35d4f3d2e12fd598cbe02f4a5b31fc0e3b9d5e9ac37503152ce9 | assert_*|test_wrong_shebang_format|import pytest from wemake_python_styleguide.violations.best_practices import ShebangViolation from wemake_python_styleguide.visitors.tokenize import comments template_empty = '' template_newlines = '\n\n' template_regular = '{0}' template_with_leading_comment = """{0} # some other """... | [ShebangViolation]) | 216 | 4 |
wemake-services/wemake-python-styleguide | train | 477 | 482194d45d125598210f2d68b477964e8cb74dc3 | train | tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_unnecessary_raw_strings.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_unnecessary_raw_strings.py | 56 | 4 | assert_* | test_unnecessary_raw_string | import pytest
from wemake_python_styleguide.violations.consistency import (
RawStringNotNeededViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongStringTokenVisitor,
)
@pytest.mark.parametrize('raw_strings', [
r"r'some text\\'",
r"r'some text\''",
r"r'some text\"... | [RawStringNotNeededViolation]) | modified | 3a35adf940707e8832d83b6ab4402747cabdda3361930eaaeaa30613f2c40d35 | assert_*|test_unnecessary_raw_string|import pytest from wemake_python_styleguide.violations.consistency import ( RawStringNotNeededViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) @pytest.mark.parametrize('raw_strings', [ r"r'some text\\'", r"r'some text\''", r... | [RawStringNotNeededViolation]) | 58 | 4 |
wemake-services/wemake-python-styleguide | train | 478 | b43d68d05184ce8f323b179274bfbb93bb393d95 | train | tests/fixtures/noqa/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa/noqa.py | 248 | 4 | assert | """
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
from typing import List
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from _some import protected # noqa: WPS436
from some import _protected # noqa: WPS450
from ... | test_function(3) | modified | 67a0fc37aeb3e9d73c8fca7a4ccdeeb29d32d9ea22738cbe05045dd363701961 | assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from foo... | test_function(3) | 247 | 4 | |
wemake-services/wemake-python-styleguide | train | 478 | b43d68d05184ce8f323b179274bfbb93bb393d95 | train | tests/fixtures/noqa/noqa.py | train | wemake-services/wemake-python-styleguide:tests/fixtures/noqa/noqa.py | 308 | 0 | assert | """
This file contains all possible violations.
It is used for e2e tests.
"""
from __future__ import print_function # noqa: WPS422
from typing import List
import os.path # noqa: WPS301
import sys as sys # noqa: WPS113
from _some import protected # noqa: WPS436
from some import _protected # noqa: WPS450
from ... | octal_number | modified | 70b3b9785f8a82c2fcedebe1596c5b3347e2c44b286255e9927820ce4ecf3707 | assert||""" This file contains all possible violations. It is used for e2e tests. """ from __future__ import print_function # noqa: WPS422 from typing import List import os.path # noqa: WPS301 import sys as sys # noqa: WPS113 from _some import protected # noqa: WPS436 from some import _protected # noqa: WPS450 from foo... | octal_number | 307 | 0 | |
wemake-services/wemake-python-styleguide | train | 478 | b43d68d05184ce8f323b179274bfbb93bb393d95 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 309 | 8 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors | modified | 9e64dfa5c7fe109bf3c89e63bcde2fcb532507498e8df853581ae66c03df05d2 | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors | 308 | 8 | |
wemake-services/wemake-python-styleguide | train | 478 | b43d68d05184ce8f323b179274bfbb93bb393d95 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 319 | 4 | assert | test_codes | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_violations) | modified | d9170742dcb24c8b5f3c83d42ca82e043ec26b9af144ca18652ed2624d2c4abd | assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a... | len(all_violations) | 318 | 4 |
wemake-services/wemake-python-styleguide | train | 478 | b43d68d05184ce8f323b179274bfbb93bb393d95 | train | tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | 88 | 4 | assert_* | test_wrong_string | import pytest
from wemake_python_styleguide.violations.complexity import (
TooComplexFormattedStringViolation,
)
from wemake_python_styleguide.violations.consistency import (
FormattedStringViolation,
)
from wemake_python_styleguide.visitors.ast.builtins import (
WrongFormatStringVisitor,
WrongStringVi... | [ FormattedStringViolation, TooComplexFormattedStringViolation, ]) | added | 629d5c3bb8a654a2822526ed5f38dd910b2fda66cb6ffca3f344a1cf0d022a68 | assert_*|test_wrong_string|import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongFormatStringVisitor, Wro... | null | null | null |
wemake-services/wemake-python-styleguide | train | 478 | b43d68d05184ce8f323b179274bfbb93bb393d95 | train | tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | 142 | 4 | assert_* | test_simple_f_string | import pytest
from wemake_python_styleguide.violations.complexity import (
TooComplexFormattedStringViolation,
)
from wemake_python_styleguide.violations.consistency import (
FormattedStringViolation,
)
from wemake_python_styleguide.visitors.ast.builtins import (
WrongFormatStringVisitor,
WrongStringVi... | [FormattedStringViolation]) | added | a2c38581a7dac0202a603b4ba77cae04e065874bcc94671efdc7ead622444444 | assert_*|test_simple_f_string|import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongFormatStringVisitor, ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 478 | b43d68d05184ce8f323b179274bfbb93bb393d95 | train | tests/test_visitors/test_ast/test_builtins/test_strings/test_modulo_formatting.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_modulo_formatting.py | 99 | 4 | assert_* | test_modulo_formatting | import pytest
from wemake_python_styleguide.violations.complexity import (
TooComplexFormattedStringViolation,
)
from wemake_python_styleguide.violations.consistency import (
FormattedStringViolation,
ModuloStringFormatViolation,
)
from wemake_python_styleguide.visitors.ast.builtins import WrongStringVisit... | ( FormattedStringViolation, )) | modified | 890cf95862ec2e0377962b79d6865c6e2952c700fc0215a24c590b1145627db6 | assert_*|test_modulo_formatting|import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ModuloStringFormatViolation, ) from wemake_python_styleguide.visitors.ast.builtins impo... | ( FormattedStringViolation, )) | 96 | 4 |
wemake-services/wemake-python-styleguide | train | 478 | b43d68d05184ce8f323b179274bfbb93bb393d95 | train | tests/test_visitors/test_ast/test_builtins/test_strings/test_modulo_formatting.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_modulo_formatting.py | 147 | 4 | assert_* | test_regular_modulo_string | import pytest
from wemake_python_styleguide.violations.complexity import (
TooComplexFormattedStringViolation,
)
from wemake_python_styleguide.violations.consistency import (
FormattedStringViolation,
ModuloStringFormatViolation,
)
from wemake_python_styleguide.visitors.ast.builtins import WrongStringVisit... | ( FormattedStringViolation, TooComplexFormattedStringViolation, )) | modified | dbe6dea6ffc6d9b387fdc98310beff9442e3075023c2abfb7c118ce34279bbfe | assert_*|test_regular_modulo_string|import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ModuloStringFormatViolation, ) from wemake_python_styleguide.visitors.ast.builtins ... | (FormattedStringViolation,)) | 144 | 4 |
wemake-services/wemake-python-styleguide | train | 479 | 9b19432962722b08fbaddfc75a0710e28a5347b0 | train | tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | 118 | 4 | assert_* | test_complex_f_string | import pytest
from wemake_python_styleguide.violations.complexity import (
TooComplexFormattedStringViolation,
)
from wemake_python_styleguide.violations.consistency import (
FormattedStringViolation,
)
from wemake_python_styleguide.visitors.ast.builtins import (
WrongFormatStringVisitor,
WrongStringVi... | [TooComplexFormattedStringViolation]) | modified | edecf7751aa63eebfe31d7c91d21dc6d3449a97f451b13c971f580a7a405f1d3 | assert_*|test_complex_f_string|import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongFormatStringVisitor,... | [ FormattedStringViolation, TooComplexFormattedStringViolation, ]) | 118 | 4 |
wemake-services/wemake-python-styleguide | train | 479 | 9b19432962722b08fbaddfc75a0710e28a5347b0 | train | tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | 143 | 4 | assert_* | test_simple_f_string | import pytest
from wemake_python_styleguide.violations.complexity import (
TooComplexFormattedStringViolation,
)
from wemake_python_styleguide.violations.consistency import (
FormattedStringViolation,
)
from wemake_python_styleguide.visitors.ast.builtins import (
WrongFormatStringVisitor,
WrongStringVi... | [FormattedStringViolation]) | modified | efd94c01ea2866731a32c8d0a7d6af48c0922a259dcc555b51394f96ff2388b8 | assert_*|test_simple_f_string|import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongFormatStringVisitor, ... | [FormattedStringViolation]) | 142 | 4 |
wemake-services/wemake-python-styleguide | train | 480 | 6f4d556892c4f2d12ca74727f5a9fe88e7f03eea | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 306 | 12 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors | modified | 506c2a40e045f19904c369d22632a1bd2f3c6bb2b3647e60d842f58f283a96bf | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors | 306 | 12 | |
wemake-services/wemake-python-styleguide | train | 480 | 6f4d556892c4f2d12ca74727f5a9fe88e7f03eea | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 310 | 8 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors.get(found_error) | modified | 6a23627cf2711731d83bd171f0b6ab37b2e77229821e90acb1d49506b4ba01d8 | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors.get(found_error) | 310 | 8 | |
wemake-services/wemake-python-styleguide | train | 480 | 6f4d556892c4f2d12ca74727f5a9fe88e7f03eea | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 319 | 4 | assert | test_codes | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_violations) | modified | fe060813b5bfd7bea439783e9be4fcbb2e6156d38125b33c7e9abe3afae1588e | assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a... | len(all_violations) | 319 | 4 |
wemake-services/wemake-python-styleguide | train | 480 | 6f4d556892c4f2d12ca74727f5a9fe88e7f03eea | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 393 | 4 | assert | test_noqa_fixture_disabled_no_control | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_controlled_violations) | modified | 29f55856a0ff1368e568cb8d189c132a77db08895617d4a223ed871fb129f78e | assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st... | len(all_controlled_violations) | 393 | 4 |
wemake-services/wemake-python-styleguide | train | 480 | 6f4d556892c4f2d12ca74727f5a9fe88e7f03eea | train | tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | 88 | 4 | assert_* | test_wrong_string | import pytest
from wemake_python_styleguide.violations.complexity import (
TooComplexFormattedStringViolation,
)
from wemake_python_styleguide.violations.consistency import (
FormattedStringViolation,
)
from wemake_python_styleguide.visitors.ast.builtins import (
WrongFormatStringVisitor,
WrongStringVi... | [ TooComplexFormattedStringViolation, FormattedStringViolation, ]) | modified | 6077e502047e93b4d471037c491059effc1da758ab5fe7732a683dda507f7bf1 | assert_*|test_wrong_string|import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongFormatStringVisitor, Wro... | [ FormattedStringViolation, TooComplexFormattedStringViolation, ]) | 88 | 4 |
wemake-services/wemake-python-styleguide | train | 480 | 6f4d556892c4f2d12ca74727f5a9fe88e7f03eea | train | tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | 118 | 4 | assert_* | test_complex_f_string | import pytest
from wemake_python_styleguide.violations.complexity import (
TooComplexFormattedStringViolation,
)
from wemake_python_styleguide.violations.consistency import (
FormattedStringViolation,
)
from wemake_python_styleguide.visitors.ast.builtins import (
WrongFormatStringVisitor,
WrongStringVi... | [TooComplexFormattedStringViolation]) | modified | 3f0b92a67b2f859556af5b2d18c0472275c15b97a745b777485f84f7b1472d23 | assert_*|test_complex_f_string|import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongFormatStringVisitor,... | [TooComplexFormattedStringViolation]) | 118 | 4 |
wemake-services/wemake-python-styleguide | train | 480 | 6f4d556892c4f2d12ca74727f5a9fe88e7f03eea | train | tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | 143 | 4 | assert_* | test_simple_f_string | import pytest
from wemake_python_styleguide.violations.complexity import (
TooComplexFormattedStringViolation,
)
from wemake_python_styleguide.violations.consistency import (
FormattedStringViolation,
)
from wemake_python_styleguide.visitors.ast.builtins import (
WrongFormatStringVisitor,
WrongStringVi... | [FormattedStringViolation]) | modified | e7e7fa53d50d09600aaec5c68a85018a8109733b2631ecb69b31faaec6365cf1 | assert_*|test_simple_f_string|import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongFormatStringVisitor, ... | [FormattedStringViolation]) | 143 | 4 |
wemake-services/wemake-python-styleguide | train | 481 | dd789fcc4ef8b02ec945b6fea37fc9ea47187ff5 | train | tests/test_logic/test_tree/test_functions.py | val | wemake-services/wemake-python-styleguide:tests/test_logic/test_tree/test_functions.py | 29 | 4 | assert | test_given_function_called_no_split | import pytest
from wemake_python_styleguide.logic.tree import functions
@pytest.mark.parametrize(('function_call', 'function_name'), [
# Simple builtin functions
('print("Hello world!")', 'print'),
('int("10")', 'int'),
('bool(1)', 'bool'),
('open("/tmp/file.txt", "r")', 'open'),
('str(10)', ... | function_name | added | 1d7dee7b156d7417f43a6041a345493f209655d8a5b626fd741513b919f19a04 | assert|test_given_function_called_no_split|import pytest from wemake_python_styleguide.logic.tree import functions @pytest.mark.parametrize(('function_call', 'function_name'), [ # Simple builtin functions ('print("Hello world!")', 'print'), ('int("10")', 'int'), ('bool(1)', 'bool'), ('open("/tmp/file.txt", "r")', 'open... | null | null | null |
wemake-services/wemake-python-styleguide | train | 481 | dd789fcc4ef8b02ec945b6fea37fc9ea47187ff5 | train | tests/test_logic/test_tree/test_functions.py | val | wemake-services/wemake-python-styleguide:tests/test_logic/test_tree/test_functions.py | 59 | 4 | assert | test_given_function_called_with_split | import pytest
from wemake_python_styleguide.logic.tree import functions
@pytest.mark.parametrize(('function_call', 'function_name'), [
# Simple builtin functions
('print("Hello world!")', 'print'),
('int("10")', 'int'),
('bool(1)', 'bool'),
('open("/tmp/file.txt", "r")', 'open'),
('str(10)', ... | function_name | added | b6b3f02a80223bad33a16ff34c33c3c753c31823fb3b541f034940c9d98562cb | assert|test_given_function_called_with_split|import pytest from wemake_python_styleguide.logic.tree import functions @pytest.mark.parametrize(('function_call', 'function_name'), [ # Simple builtin functions ('print("Hello world!")', 'print'), ('int("10")', 'int'), ('bool(1)', 'bool'), ('open("/tmp/file.txt", "r")', 'op... | null | null | null |
wemake-services/wemake-python-styleguide | train | 482 | 2afc9a7fba1132a9c33c88fc59b527437ee170ab | train | tests/test_visitors/test_ast/test_builtins/test_strings/test_modulo_formatting.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_modulo_formatting.py | 177 | 4 | assert_* | test_functions_modulo_string | import pytest
from wemake_python_styleguide.violations.complexity import (
TooComplexFormattedStringViolation,
)
from wemake_python_styleguide.violations.consistency import (
FormattedStringViolation,
ModuloStringFormatViolation,
)
from wemake_python_styleguide.visitors.ast.builtins import WrongStringVisit... | (FormattedStringViolation,)) | added | 6465ea15f3c95b05af8f00f799c8750c62f8343fafbcbbc29d9f0a88a4a2651f | assert_*|test_functions_modulo_string|import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ModuloStringFormatViolation, ) from wemake_python_styleguide.visitors.ast.builtin... | null | null | null |
wemake-services/wemake-python-styleguide | train | 483 | aedf714911d26bbc2ff6f235cbe6b6e7397647bf | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 311 | 8 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors.get(found_error) | modified | 08ff06d4187914740dea52800eb169452ad46efb428dbae56d8f488a8041e1c5 | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors.get(found_error) | 310 | 8 | |
wemake-services/wemake-python-styleguide | train | 483 | aedf714911d26bbc2ff6f235cbe6b6e7397647bf | train | tests/test_visitors/test_ast/test_complexity/test_function/test_arguments_lambda.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_function/test_arguments_lambda.py | 101 | 4 | assert_* | test_no_arguments_error | import pytest
from wemake_python_styleguide.compat.constants import PY38
from wemake_python_styleguide.violations.complexity import (
TooManyArgumentsViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.function import (
FunctionComplexityVisitor,
)
lambda_without_arguments = 'lambda: ...'
lambd... | option_values.max_arguments) | modified | a3ab5e8a4187fc284e920fef3fdde4d4ede265dedbb637b7652b7fce8f303110 | assert_*|test_no_arguments_error|import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.violations.complexity import ( TooManyArgumentsViolation, ) from wemake_python_styleguide.visitors.ast.complexity.function import ( FunctionComplexityVisitor, ) lambda_without_argument... | option_values.max_arguments) | 99 | 4 |
wemake-services/wemake-python-styleguide | train | 483 | aedf714911d26bbc2ff6f235cbe6b6e7397647bf | train | tests/test_visitors/test_ast/test_complexity/test_function/test_awaits_count.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_function/test_awaits_count.py | 67 | 4 | assert_* | test_awaits_wrong_count | import pytest
from wemake_python_styleguide.violations.complexity import (
TooManyAwaitsViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.function import (
FunctionComplexityVisitor,
)
function_without_awaits = 'def function(): ...'
function_async_without_awaits = 'async def function(): ...'
... | [TooManyAwaitsViolation]) | modified | 7d6308ef5f89a003230454f5a5efc0443e4e2a00ac5eb060d2751a658b23b575 | assert_*|test_awaits_wrong_count|import pytest from wemake_python_styleguide.violations.complexity import ( TooManyAwaitsViolation, ) from wemake_python_styleguide.visitors.ast.complexity.function import ( FunctionComplexityVisitor, ) function_without_awaits = 'def function(): ...' function_async_without_awaits = 'asyn... | [TooManyAwaitsViolation]) | 65 | 4 |
wemake-services/wemake-python-styleguide | train | 483 | aedf714911d26bbc2ff6f235cbe6b6e7397647bf | train | tests/test_visitors/test_ast/test_complexity/test_function/test_expressions.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_function/test_expressions.py | 70 | 4 | assert_* | test_expressions_wrong_count | import pytest
from wemake_python_styleguide.violations.complexity import (
TooManyExpressionsViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.function import (
FunctionComplexityVisitor,
)
function_without_expressions = """
def function():
return 1
"""
function_with_expressions = """
de... | [TooManyExpressionsViolation]) | modified | 20ad2c0772f5796d9250ffd2a26bec12334d577ad0a2a3325a6927aba5904615 | assert_*|test_expressions_wrong_count|import pytest from wemake_python_styleguide.violations.complexity import ( TooManyExpressionsViolation, ) from wemake_python_styleguide.visitors.ast.complexity.function import ( FunctionComplexityVisitor, ) function_without_expressions = """ def function(): return 1 """ function_wi... | [TooManyExpressionsViolation]) | 68 | 4 |
wemake-services/wemake-python-styleguide | train | 483 | aedf714911d26bbc2ff6f235cbe6b6e7397647bf | train | tests/test_visitors/test_ast/test_complexity/test_function/test_raises.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_function/test_raises.py | 136 | 4 | assert_* | test_raises_wrong_count | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.complexity import (
TooManyRaisesViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.function import (
FunctionComplexityVisitor,
)
module_many_raises = """
if some:
raise SomeException
raise SomeOtherException
... | [TooManyRaisesViolation]) | added | d9b4a96737535815cef2bb62909ba003cefac8dff3ab0b7f446b3cc03210ba80 | assert_*|test_raises_wrong_count|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooManyRaisesViolation, ) from wemake_python_styleguide.visitors.ast.complexity.function import ( FunctionComplexityVisitor, ) module_many_raises = """ if some: raise SomeException raise S... | null | null | null |
wemake-services/wemake-python-styleguide | train | 483 | aedf714911d26bbc2ff6f235cbe6b6e7397647bf | train | tests/test_visitors/test_ast/test_complexity/test_function/test_raises.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_function/test_raises.py | 137 | 4 | assert_* | test_raises_wrong_count | # -*- coding: utf-8 -*-
import pytest
from wemake_python_styleguide.violations.complexity import (
TooManyRaisesViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.function import (
FunctionComplexityVisitor,
)
module_many_raises = """
if some:
raise SomeException
raise SomeOtherException
... | option_values.max_raises) | added | c18a0e8ae2acae29ff598ecacac86b334acf907c36142bdf605e504b48c3f7de | assert_*|test_raises_wrong_count|# -*- coding: utf-8 -*- import pytest from wemake_python_styleguide.violations.complexity import ( TooManyRaisesViolation, ) from wemake_python_styleguide.visitors.ast.complexity.function import ( FunctionComplexityVisitor, ) module_many_raises = """ if some: raise SomeException raise S... | null | null | null |
wemake-services/wemake-python-styleguide | train | 483 | aedf714911d26bbc2ff6f235cbe6b6e7397647bf | train | tests/test_visitors/test_ast/test_complexity/test_function/test_returns.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_function/test_returns.py | 67 | 4 | assert_* | test_returns_wrong_count | import pytest
from wemake_python_styleguide.violations.complexity import (
TooManyReturnsViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.function import (
FunctionComplexityVisitor,
)
function_without_returns = 'def function(): ...'
function_with_returns = """
def function():
if 1 > 2:... | [TooManyReturnsViolation]) | modified | 4323e14a20ecb63acb71cf730f929f8528e6ac71b5e5438221410710f12e7e2a | assert_*|test_returns_wrong_count|import pytest from wemake_python_styleguide.violations.complexity import ( TooManyReturnsViolation, ) from wemake_python_styleguide.visitors.ast.complexity.function import ( FunctionComplexityVisitor, ) function_without_returns = 'def function(): ...' function_with_returns = """ def fu... | [TooManyReturnsViolation]) | 65 | 4 |
wemake-services/wemake-python-styleguide | train | 483 | aedf714911d26bbc2ff6f235cbe6b6e7397647bf | train | tests/test_visitors/test_ast/test_complexity/test_function/test_returns.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_complexity/test_function/test_returns.py | 68 | 4 | assert_* | test_returns_wrong_count | import pytest
from wemake_python_styleguide.violations.complexity import (
TooManyReturnsViolation,
)
from wemake_python_styleguide.visitors.ast.complexity.function import (
FunctionComplexityVisitor,
)
function_without_returns = 'def function(): ...'
function_with_returns = """
def function():
if 1 > 2:... | option_values.max_returns) | modified | cc9da2f52aaf6fe94a34bbb94a759ccc3de127567b6b7db3083eac22f2557ef6 | assert_*|test_returns_wrong_count|import pytest from wemake_python_styleguide.violations.complexity import ( TooManyReturnsViolation, ) from wemake_python_styleguide.visitors.ast.complexity.function import ( FunctionComplexityVisitor, ) function_without_returns = 'def function(): ...' function_with_returns = """ def fu... | option_values.max_returns) | 66 | 4 |
wemake-services/wemake-python-styleguide | train | 484 | d95c9dffe40db9a988973e9b1957aa1de62417bf | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 308 | 12 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors | modified | 7d56ba6b039fde9eda95c8901830b565902e31123f3378bcfc2ef6a1cdcb53d1 | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors | 307 | 12 | |
wemake-services/wemake-python-styleguide | train | 484 | d95c9dffe40db9a988973e9b1957aa1de62417bf | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 312 | 8 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors.get(found_error) | modified | 549367b17d0ff81a51afca7c72af8c3024cf5af98162e0e48665ce0811c874f7 | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors.get(found_error) | 311 | 8 | |
wemake-services/wemake-python-styleguide | train | 484 | d95c9dffe40db9a988973e9b1957aa1de62417bf | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 321 | 4 | assert | test_codes | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_violations) | modified | b69f7b007672936e876ece5ab84b78d37b8f6119b52833352483ebf0da974ce1 | assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a... | len(all_violations) | 320 | 4 |
wemake-services/wemake-python-styleguide | train | 484 | d95c9dffe40db9a988973e9b1957aa1de62417bf | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 395 | 4 | assert | test_noqa_fixture_disabled_no_control | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_controlled_violations) | modified | aa4c132edec5318317cd5719561c7c3bb9a1e4b1a4793f0962b5be636a24c04f | assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st... | len(all_controlled_violations) | 394 | 4 |
wemake-services/wemake-python-styleguide | train | 484 | d95c9dffe40db9a988973e9b1957aa1de62417bf | train | tests/test_visitors/test_ast/test_compares/test_float_complex_compare.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_float_complex_compare.py | 35 | 4 | assert_* | test_float_complex_compare | import pytest
from wemake_python_styleguide.violations.best_practices import (
FloatComplexCompareViolation,
)
from wemake_python_styleguide.visitors.ast.compares import (
WrongFloatComplexCompareVisitor,
)
@pytest.mark.parametrize('code', [
'3.0 > 2.0 + 1.0',
'f2/f1 != 1.0',
'3.0 in item_list',
... | [FloatComplexCompareViolation]) | added | daa8341a1d26af53d302e843f64193251f73a912520e7cb81f4f9e29e76f2ef0 | assert_*|test_float_complex_compare|import pytest from wemake_python_styleguide.violations.best_practices import ( FloatComplexCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongFloatComplexCompareVisitor, ) @pytest.mark.parametrize('code', [ '3.0 > 2.0 + 1.0', 'f2/f1 != 1.0', '3.0 in... | null | null | null |
wemake-services/wemake-python-styleguide | train | 485 | 5ef0346682a738fef6b49465c63cd6d63a5ba825 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 312 | 8 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors | modified | 11dc6b7f4c24bfcf4206c8c21607a4365bf015cc7f38ee647d559310d220314c | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors | 311 | 8 | |
wemake-services/wemake-python-styleguide | train | 485 | 5ef0346682a738fef6b49465c63cd6d63a5ba825 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 313 | 8 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors.get(found_error) | modified | 3177472cd48b838c8a4e0b3cd008499ef10c936a1a7796cb4578118914c404ca | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors.get(found_error) | 312 | 8 | |
wemake-services/wemake-python-styleguide | train | 485 | 5ef0346682a738fef6b49465c63cd6d63a5ba825 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 322 | 4 | assert | test_codes | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_violations) | modified | beda75f917ff517625c50bdbe203ce7e76ba4c1b5674f899ca18f921f92d7c4c | assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a... | len(all_violations) | 321 | 4 |
wemake-services/wemake-python-styleguide | train | 485 | 5ef0346682a738fef6b49465c63cd6d63a5ba825 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 396 | 4 | assert | test_noqa_fixture_disabled_no_control | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_controlled_violations) | modified | 33c6a3bd76a4a42d6ea3bdee3391f82e76f9f667c465965455c872ce9ae240a2 | assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st... | len(all_controlled_violations) | 395 | 4 |
wemake-services/wemake-python-styleguide | train | 485 | 5ef0346682a738fef6b49465c63cd6d63a5ba825 | train | tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_rules.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_rules.py | 189 | 4 | assert_* | test_multiple_assignments | import pytest
from wemake_python_styleguide.violations.best_practices import (
SingleElementDestructuringViolation,
WrongUnpackingViolation,
)
from wemake_python_styleguide.violations.consistency import (
UnpackingIterableToListViolation,
)
from wemake_python_styleguide.visitors.ast.builtins import (
W... | [WrongUnpackingViolation]) | added | c56d1f7c2bfa3b8a90cdec4baf7a043153c923e7839d59080146a634e05cf353 | assert_*|test_multiple_assignments|import pytest from wemake_python_styleguide.violations.best_practices import ( SingleElementDestructuringViolation, WrongUnpackingViolation, ) from wemake_python_styleguide.violations.consistency import ( UnpackingIterableToListViolation, ) from wemake_python_styleguide.visitors.ast.b... | null | null | null |
wemake-services/wemake-python-styleguide | train | 485 | 5ef0346682a738fef6b49465c63cd6d63a5ba825 | train | tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_rules.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_assign/test_unpacking_rules.py | 237 | 4 | assert_* | test_single_element_destructing | import pytest
from wemake_python_styleguide.violations.best_practices import (
SingleElementDestructuringViolation,
WrongUnpackingViolation,
)
from wemake_python_styleguide.violations.consistency import (
UnpackingIterableToListViolation,
)
from wemake_python_styleguide.visitors.ast.builtins import (
W... | [SingleElementDestructuringViolation]) | added | bfc58afb2a1f115f7336b93bde9b0841c1e082f357e2a129b542571161cf3b8f | assert_*|test_single_element_destructing|import pytest from wemake_python_styleguide.violations.best_practices import ( SingleElementDestructuringViolation, WrongUnpackingViolation, ) from wemake_python_styleguide.violations.consistency import ( UnpackingIterableToListViolation, ) from wemake_python_styleguide.visitors... | null | null | null |
wemake-services/wemake-python-styleguide | train | 486 | 79ec1775d00831b861d319077a25ce093fd2bba5 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 313 | 8 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors | modified | 31d9c8779bf6f1742e432cbe264394ef73e10ebed07c23b72b577c082500a5f8 | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors | 312 | 8 | |
wemake-services/wemake-python-styleguide | train | 486 | 79ec1775d00831b861d319077a25ce093fd2bba5 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 314 | 8 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors.get(found_error) | modified | 27635afffb99c1158a7e6509531b08888681f3756442f332fee29e16bd0e592f | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors.get(found_error) | 313 | 8 | |
wemake-services/wemake-python-styleguide | train | 486 | 79ec1775d00831b861d319077a25ce093fd2bba5 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 323 | 4 | assert | test_codes | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_violations) | modified | 7712979140184906221c8998ce6c8d48049e3b8f60134067b34ad57cf6bbe2d0 | assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a... | len(all_violations) | 322 | 4 |
wemake-services/wemake-python-styleguide | train | 486 | 79ec1775d00831b861d319077a25ce093fd2bba5 | train | tests/test_visitors/test_tokenize/test_comments/test_forbidden_noqa.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_forbidden_noqa.py | 28 | 4 | assert_* | test_forbidden_noqa | import pytest
from wemake_python_styleguide.violations.best_practices import (
ForbiddenInlineIgnoreViolation,
)
from wemake_python_styleguide.visitors.tokenize.comments import NoqaVisitor
@pytest.mark.parametrize(('code', 'forbidden_inline_ignore'), [
('x = 10_00 # noqa: WPS002,Z114', 'A, C,WPS002'),
(... | [ForbiddenInlineIgnoreViolation]) | added | 8cc4b5641530d26f58edffd00d7f40d69804549fe97f43a26e9c27fd0d9c9962 | assert_*|test_forbidden_noqa|import pytest from wemake_python_styleguide.violations.best_practices import ( ForbiddenInlineIgnoreViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import NoqaVisitor @pytest.mark.parametrize(('code', 'forbidden_inline_ignore'), [ ('x = 10_00 # noqa: WPS002,Z114', 'A, ... | null | null | null |
wemake-services/wemake-python-styleguide | train | 486 | 79ec1775d00831b861d319077a25ce093fd2bba5 | train | tests/test_visitors/test_tokenize/test_comments/test_noqa_comment.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_noqa_comment.py | 60 | 4 | assert_* | test_incorrect_noqa_comment | import pytest
from wemake_python_styleguide.violations.best_practices import (
WrongMagicCommentViolation,
)
from wemake_python_styleguide.visitors.tokenize.comments import NoqaVisitor
@pytest.mark.parametrize('code', [
'x = 10_00 # noqa: WPS002,Z114',
'x = 10_00 # noqa:A002, U114',
'x = 10_00 # n... | [WrongMagicCommentViolation]) | modified | cafc24f733814e6c7334ce710e9f198ff99ed6aa201ff75b951ad0a5283a6290 | assert_*|test_incorrect_noqa_comment|import pytest from wemake_python_styleguide.violations.best_practices import ( WrongMagicCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import NoqaVisitor @pytest.mark.parametrize('code', [ 'x = 10_00 # noqa: WPS002,Z114', 'x = 10_00 # noqa:A002, U114',... | [WrongMagicCommentViolation]) | 62 | 4 |
wemake-services/wemake-python-styleguide | train | 486 | 79ec1775d00831b861d319077a25ce093fd2bba5 | train | tests/test_visitors/test_tokenize/test_comments/test_noqa_count.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_noqa_count.py | 30 | 4 | assert_* | test_noqa_overuse | import pytest
from wemake_python_styleguide.options import defaults
from wemake_python_styleguide.violations.best_practices import (
OveruseOfNoqaCommentViolation,
)
from wemake_python_styleguide.visitors.tokenize.comments import NoqaVisitor
@pytest.mark.parametrize('code', [
'wallet = 10 # noqa: WPS002,WPS... | [OveruseOfNoqaCommentViolation]) | modified | f8f7b0fece8e8ee5c55406932174c163cc500242c253ae0f7deea35cf6f85273 | assert_*|test_noqa_overuse|import pytest from wemake_python_styleguide.options import defaults from wemake_python_styleguide.violations.best_practices import ( OveruseOfNoqaCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import NoqaVisitor @pytest.mark.parametrize('code', [ 'wallet = 10 # n... | [OveruseOfNoqaCommentViolation]) | 32 | 4 |
wemake-services/wemake-python-styleguide | train | 486 | 79ec1775d00831b861d319077a25ce093fd2bba5 | train | tests/test_visitors/test_tokenize/test_comments/test_noqa_count.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_noqa_count.py | 47 | 4 | assert_* | test_noqa_overuse_is_configurable | import pytest
from wemake_python_styleguide.options import defaults
from wemake_python_styleguide.violations.best_practices import (
OveruseOfNoqaCommentViolation,
)
from wemake_python_styleguide.visitors.tokenize.comments import NoqaVisitor
@pytest.mark.parametrize('code', [
'wallet = 10 # noqa: WPS002,WPS... | [OveruseOfNoqaCommentViolation]) | modified | 94cf1f2346f344b9bd0663b3f5c94d981f19648076bfab7ad35bf10b6a9157ed | assert_*|test_noqa_overuse_is_configurable|import pytest from wemake_python_styleguide.options import defaults from wemake_python_styleguide.violations.best_practices import ( OveruseOfNoqaCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import NoqaVisitor @pytest.mark.parametrize('code', [ ... | [OveruseOfNoqaCommentViolation]) | 49 | 4 |
wemake-services/wemake-python-styleguide | train | 486 | 79ec1775d00831b861d319077a25ce093fd2bba5 | train | tests/test_visitors/test_tokenize/test_comments/test_noqa_count.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_noqa_count.py | 62 | 4 | assert_* | test_noqa_comments_can_be_forbidden | import pytest
from wemake_python_styleguide.options import defaults
from wemake_python_styleguide.violations.best_practices import (
OveruseOfNoqaCommentViolation,
)
from wemake_python_styleguide.visitors.tokenize.comments import NoqaVisitor
@pytest.mark.parametrize('code', [
'wallet = 10 # noqa: WPS002,WPS... | [OveruseOfNoqaCommentViolation]) | modified | 4bccac68bd6fde5028fa812d96df12a7f3a2e6ab3d14e65924b4f4112f7ce7ee | assert_*|test_noqa_comments_can_be_forbidden|import pytest from wemake_python_styleguide.options import defaults from wemake_python_styleguide.violations.best_practices import ( OveruseOfNoqaCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import NoqaVisitor @pytest.mark.parametrize('code', ... | [OveruseOfNoqaCommentViolation]) | 64 | 4 |
wemake-services/wemake-python-styleguide | train | 487 | d3a2b90531c36f4a5a6d218a291cd55adf3ddf20 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 311 | 12 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors | modified | e01e91a8eb8dd4712fdfbbe7c1b7aaf0152e1861f35305e8764afb2214d696cc | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors | 310 | 12 | |
wemake-services/wemake-python-styleguide | train | 487 | d3a2b90531c36f4a5a6d218a291cd55adf3ddf20 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 314 | 8 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors | modified | 14ea46f1f6cc9575483176703b1be10891b3cdf4a8824f91ad16b883ce00b434 | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors | 313 | 8 | |
wemake-services/wemake-python-styleguide | train | 487 | d3a2b90531c36f4a5a6d218a291cd55adf3ddf20 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 324 | 4 | assert | test_codes | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_violations) | modified | ebb24d1c83dc5e7376a42ba9e8df62e6f905a4991cbe26208f833d86b489438b | assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a... | len(all_violations) | 323 | 4 |
wemake-services/wemake-python-styleguide | train | 487 | d3a2b90531c36f4a5a6d218a291cd55adf3ddf20 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 398 | 4 | assert | test_noqa_fixture_disabled_no_control | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_controlled_violations) | modified | 3f4239fa30dd4befd44c892751bea641046c5e1ec1e8a10f4f6b028337a87dd2 | assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st... | len(all_controlled_violations) | 397 | 4 |
wemake-services/wemake-python-styleguide | train | 487 | d3a2b90531c36f4a5a6d218a291cd55adf3ddf20 | train | tests/test_visitors/test_ast/test_blocks/test_outer_scope_shadow.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_blocks/test_outer_scope_shadow.py | 348 | 4 | assert_* | test_outer_variable_double_shadow | import pytest
from wemake_python_styleguide.compat.constants import PY38
from wemake_python_styleguide.violations.best_practices import (
OuterScopeShadowingViolation,
)
from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor
# Correct:
correct_for_loop1 = """
import ast
def wrapper():
... | [ OuterScopeShadowingViolation, OuterScopeShadowingViolation, ]) | modified | 5653ea702e622a9009b873f85de60eaadd4ed755f1d0b2e9b42ba6c6f1a2a24d | assert_*|test_outer_variable_double_shadow|import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.violations.best_practices import ( OuterScopeShadowingViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Correct: correct_for_loop1 ... | [ OuterScopeShadowingViolation, OuterScopeShadowingViolation, ]) | 347 | 4 |
wemake-services/wemake-python-styleguide | train | 487 | d3a2b90531c36f4a5a6d218a291cd55adf3ddf20 | train | tests/test_visitors/test_ast/test_functions/test_unused_variables.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_unused_variables.py | 190 | 4 | assert_* | test_double_wrong_variables | import pytest
from wemake_python_styleguide.compat.constants import PY38
from wemake_python_styleguide.violations.naming import (
UnusedVariableIsUsedViolation,
)
from wemake_python_styleguide.visitors.ast.functions import (
FunctionDefinitionVisitor,
)
# Correct:
correct_module = """
_PROTECTED = 1
PUBLIC =... | [ UnusedVariableIsUsedViolation, UnusedVariableIsUsedViolation, ]) | modified | 6aa050956eda67632a40671efa57d58ea16229e7afa7b1d3dbb808094731adc2 | assert_*|test_double_wrong_variables|import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.violations.naming import ( UnusedVariableIsUsedViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionDefinitionVisitor, ) # Correct: correct_module = "... | [ UnusedVariableIsUsedViolation, UnusedVariableIsUsedViolation, ]) | 189 | 4 |
wemake-services/wemake-python-styleguide | train | 487 | d3a2b90531c36f4a5a6d218a291cd55adf3ddf20 | train | tests/test_visitors/test_tokenize/test_statements/test_multiline_string.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_statements/test_multiline_string.py | 85 | 4 | assert_* | test_wrong_multiline_string_use | import pytest
from wemake_python_styleguide.violations.best_practices import (
WrongMultilineStringUseViolation,
)
from wemake_python_styleguide.visitors.tokenize.statements import (
MultilineStringVisitor,
)
correct_assignment = '''
a = """abc
abc
"""
'''
correct_docstring = '''
def test():
"""{0}"""
''... | [WrongMultilineStringUseViolation]) | added | 642359ac63a32aec349cb5243c1385753b0204376b35a78fe2b6ef6d94e03e09 | assert_*|test_wrong_multiline_string_use|import pytest from wemake_python_styleguide.violations.best_practices import ( WrongMultilineStringUseViolation, ) from wemake_python_styleguide.visitors.tokenize.statements import ( MultilineStringVisitor, ) correct_assignment = ''' a = """abc abc """ ''' correct_docstring = ''... | null | null | null |
wemake-services/wemake-python-styleguide | train | 488 | a7b36e8edab641acb07388abcaecf0fe1528837f | train | tests/test_visitors/test_ast/test_loops/test_loops/test_lambda_in_loop.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_loops/test_loops/test_lambda_in_loop.py | 117 | 4 | assert_* | test_lambda_body | import pytest
from wemake_python_styleguide.violations.best_practices import (
LambdaInsideLoopViolation,
)
from wemake_python_styleguide.visitors.ast.loops import WrongLoopVisitor
# Wrong:
lambda_inside_for_loop = """
def wrapper():
for index in range(10):
print(lambda: index)
"""
nested_lambda_ins... | [LambdaInsideLoopViolation]) | added | 645f219983d5db6375aaa8c1e02c7f64b861098d7c23a593df5588f9ca4853b6 | assert_*|test_lambda_body|import pytest from wemake_python_styleguide.violations.best_practices import ( LambdaInsideLoopViolation, ) from wemake_python_styleguide.visitors.ast.loops import WrongLoopVisitor # Wrong: lambda_inside_for_loop = """ def wrapper(): for index in range(10): print(lambda: index) """ nested_lamb... | null | null | null |
wemake-services/wemake-python-styleguide | train | 489 | c782b6f4f746a403781a7db64d9af2d13158937a | train | tests/test_visitors/test_ast/test_functions/test_wrong_function_calls.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_wrong_function_calls.py | 68 | 4 | assert_* | test_wrong_function_call_with_module | import pytest
from wemake_python_styleguide.constants import FUNCTIONS_BLACKLIST
from wemake_python_styleguide.violations.best_practices import (
WrongFunctionCallViolation,
)
from wemake_python_styleguide.visitors.ast.functions import (
WrongFunctionCallVisitor,
)
regular_call = '{0}(*args, **kwargs)'
assign... | [WrongFunctionCallViolation]) | added | a4d13032bcfd9e06cf3338005858be804eae7b1f42dedf5a731c82c350c506af | assert_*|test_wrong_function_call_with_module|import pytest from wemake_python_styleguide.constants import FUNCTIONS_BLACKLIST from wemake_python_styleguide.violations.best_practices import ( WrongFunctionCallViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( WrongFunctionCallVisitor, ) regular_... | null | null | null |
wemake-services/wemake-python-styleguide | train | 489 | c782b6f4f746a403781a7db64d9af2d13158937a | train | tests/test_visitors/test_ast/test_functions/test_wrong_function_calls.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_wrong_function_calls.py | 69 | 4 | assert_* | test_wrong_function_call_with_module | import pytest
from wemake_python_styleguide.constants import FUNCTIONS_BLACKLIST
from wemake_python_styleguide.violations.best_practices import (
WrongFunctionCallViolation,
)
from wemake_python_styleguide.visitors.ast.functions import (
WrongFunctionCallVisitor,
)
regular_call = '{0}(*args, **kwargs)'
assign... | bad_module_and_function) | added | 3bcd24eeb754d2e3f2ee67a798872604cfc3c02073314a3ba2f061fe664915f0 | assert_*|test_wrong_function_call_with_module|import pytest from wemake_python_styleguide.constants import FUNCTIONS_BLACKLIST from wemake_python_styleguide.violations.best_practices import ( WrongFunctionCallViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( WrongFunctionCallVisitor, ) regular_... | null | null | null |
wemake-services/wemake-python-styleguide | train | 490 | 9e083df3eddf87e74239d53a8b7ff2e2e8068f74 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 312 | 12 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors | modified | d242dbfd73f74751b3a6e1b2ae7adae9dc85f2e50f8d5367fb1522f7a7aaf43f | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors | 311 | 12 | |
wemake-services/wemake-python-styleguide | train | 490 | 9e083df3eddf87e74239d53a8b7ff2e2e8068f74 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 316 | 8 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors.get(found_error) | modified | c89ae772c320f87af75c4b8b60e7b9d7f4038d0bf1cc04511c9ce7c40727d014 | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors.get(found_error) | 315 | 8 | |
wemake-services/wemake-python-styleguide | train | 490 | 9e083df3eddf87e74239d53a8b7ff2e2e8068f74 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 325 | 4 | assert | test_codes | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_violations) | modified | 0ee1416ce745c717d1afbee7b3e1af6135679f88583c9f961c4589853ce99b32 | assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a... | len(all_violations) | 324 | 4 |
wemake-services/wemake-python-styleguide | train | 490 | 9e083df3eddf87e74239d53a8b7ff2e2e8068f74 | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 399 | 4 | assert | test_noqa_fixture_disabled_no_control | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_controlled_violations) | modified | cc8680db58a4fa42fa872b3865fdbd2358d53db908791ed9835472cc52719c49 | assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st... | len(all_controlled_violations) | 398 | 4 |
wemake-services/wemake-python-styleguide | train | 490 | 9e083df3eddf87e74239d53a8b7ff2e2e8068f74 | train | tests/test_visitors/test_ast/test_functions/test_complex_default_values.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_complex_default_values.py | 110 | 4 | assert_* | test_wrong_function_defaults | import pytest
from wemake_python_styleguide.compat.constants import PY38
from wemake_python_styleguide.violations.best_practices import (
ComplexDefaultValueViolation,
PositionalOnlyArgumentsViolation,
)
from wemake_python_styleguide.visitors.ast.functions import (
FunctionSignatureVisitor,
)
function_wit... | [ComplexDefaultValueViolation]) | modified | afc430fa3382ce282eeea0a84e4d097d8814f7b6dbe8ea33e62e22c6127b0728 | assert_*|test_wrong_function_defaults|import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.violations.best_practices import ( ComplexDefaultValueViolation, PositionalOnlyArgumentsViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionSignatur... | [ComplexDefaultValueViolation]) | 110 | 4 |
wemake-services/wemake-python-styleguide | train | 490 | 9e083df3eddf87e74239d53a8b7ff2e2e8068f74 | train | tests/test_visitors/test_ast/test_functions/test_getter_without_return.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_getter_without_return.py | 207 | 4 | assert_* | test_wrong_getters | import pytest
from wemake_python_styleguide.violations.best_practices import (
GetterWithoutReturnViolation,
)
from wemake_python_styleguide.visitors.ast.functions import (
FunctionSignatureVisitor,
)
getter_function_with_implicit_return = """
def get_foo():
print('Hello world!')
"""
getter_function_with... | [GetterWithoutReturnViolation]) | added | 49e869e85719d0d5b670755a8059d5f733d4a761c6bd2b9a86e201b18343526c | assert_*|test_wrong_getters|import pytest from wemake_python_styleguide.violations.best_practices import ( GetterWithoutReturnViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionSignatureVisitor, ) getter_function_with_implicit_return = """ def get_foo(): print('Hello world!') """ getter_... | null | null | null |
wemake-services/wemake-python-styleguide | train | 490 | 9e083df3eddf87e74239d53a8b7ff2e2e8068f74 | train | tests/test_visitors/test_ast/test_functions/test_positional_only.py | test | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_positional_only.py | 99 | 4 | assert_* | test_posonyargs | import pytest
from wemake_python_styleguide.compat.constants import PY38
from wemake_python_styleguide.violations.best_practices import (
PositionalOnlyArgumentsViolation,
)
from wemake_python_styleguide.visitors.ast.functions import (
FunctionSignatureVisitor,
)
# Correct:
correct_lambda = 'lambda x, *args, ... | [PositionalOnlyArgumentsViolation]) | modified | 9d5d260249d7ef5fe9e9e62b0131e2b93d4e4a5663aaee0da038fa78ab51bc9b | assert_*|test_posonyargs|import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.violations.best_practices import ( PositionalOnlyArgumentsViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( FunctionSignatureVisitor, ) # Correct: correct_lambda = 'la... | [PositionalOnlyArgumentsViolation]) | 99 | 4 |
wemake-services/wemake-python-styleguide | train | 491 | 2a1ddb93c864979bf1409d26d8bbef874f0f56db | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 313 | 12 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors | modified | 1d7b048263cd204efac6e514a2c030d8658b1b9eea4bc7e7a5e6cccf039dc4a1 | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors | 312 | 12 | |
wemake-services/wemake-python-styleguide | train | 491 | 2a1ddb93c864979bf1409d26d8bbef874f0f56db | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 316 | 8 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors | modified | 0c85cfb2cc87fa918f0541ba42c9392c63f4558805f09f810906bc88e6684de3 | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors | 315 | 8 | |
wemake-services/wemake-python-styleguide | train | 491 | 2a1ddb93c864979bf1409d26d8bbef874f0f56db | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 326 | 4 | assert | test_codes | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_violations) | modified | 0463a9e107423d6a380486873b64b23149661de22e0fd6c5496ccffb4ac10bfd | assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a... | len(all_violations) | 325 | 4 |
wemake-services/wemake-python-styleguide | train | 491 | 2a1ddb93c864979bf1409d26d8bbef874f0f56db | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 400 | 4 | assert | test_noqa_fixture_disabled_no_control | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_controlled_violations) | modified | cf5e68cdd30271e4a83dac366f82fc9f2363551925da7eb0e0eb496b63e5f11b | assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st... | len(all_controlled_violations) | 399 | 4 |
wemake-services/wemake-python-styleguide | train | 491 | 2a1ddb93c864979bf1409d26d8bbef874f0f56db | train | tests/test_visitors/test_tokenize/test_comments/test_empty_comment.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_empty_comment.py | 125 | 4 | assert_* | test_incorrect_empty_comment | import pytest
from wemake_python_styleguide.violations.best_practices import (
EmptyCommentViolation,
)
from wemake_python_styleguide.visitors.tokenize.comments import (
EmptyCommentVisitor,
)
inline_comment = """
four = 4
seven = 7 #
"""
end_of_file_comment = """
# Non-empty
#
#
# Next line will trigger vi... | [EmptyCommentViolation]) | added | 3eb7d212e513c47947947ae09159eee7bc5501fcae937ad2d6b088cadf43e6bd | assert_*|test_incorrect_empty_comment|import pytest from wemake_python_styleguide.violations.best_practices import ( EmptyCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import ( EmptyCommentVisitor, ) inline_comment = """ four = 4 seven = 7 # """ end_of_file_comment = """ # Non-empty # # #... | null | null | null |
wemake-services/wemake-python-styleguide | train | 491 | 2a1ddb93c864979bf1409d26d8bbef874f0f56db | train | tests/test_visitors/test_tokenize/test_comments/test_empty_comment.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_empty_comment.py | 146 | 4 | assert_* | test_edge_case_empty_comment | import pytest
from wemake_python_styleguide.violations.best_practices import (
EmptyCommentViolation,
)
from wemake_python_styleguide.visitors.tokenize.comments import (
EmptyCommentVisitor,
)
inline_comment = """
four = 4
seven = 7 #
"""
end_of_file_comment = """
# Non-empty
#
#
# Next line will trigger vi... | [EmptyCommentViolation]) | added | 463d8f9d3f4269889884f6cc1b0e65c2bfb534903323abf0e73f543c1ff965b5 | assert_*|test_edge_case_empty_comment|import pytest from wemake_python_styleguide.violations.best_practices import ( EmptyCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import ( EmptyCommentVisitor, ) inline_comment = """ four = 4 seven = 7 # """ end_of_file_comment = """ # Non-empty # # #... | null | null | null |
wemake-services/wemake-python-styleguide | train | 491 | 2a1ddb93c864979bf1409d26d8bbef874f0f56db | train | tests/test_visitors/test_tokenize/test_comments/test_typed_ast.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_comments/test_typed_ast.py | 60 | 4 | assert_* | test_incorrect_type_comment | import pytest
from wemake_python_styleguide.violations.best_practices import (
WrongMagicCommentViolation,
)
from wemake_python_styleguide.visitors.tokenize.comments import (
WrongCommentVisitor,
)
@pytest.mark.parametrize('code', [
'1 + "12" # type: ignore',
'1 + "12" # type:ignore',
'1 + "12"... | [WrongMagicCommentViolation]) | modified | 5053aad16ce71d9b73affa161f5db82d1671f1c9dcd89e8bd7ec8237851570c0 | assert_*|test_incorrect_type_comment|import pytest from wemake_python_styleguide.violations.best_practices import ( WrongMagicCommentViolation, ) from wemake_python_styleguide.visitors.tokenize.comments import ( WrongCommentVisitor, ) @pytest.mark.parametrize('code', [ '1 + "12" # type: ignore', '1 + "12" # type:ignore... | [WrongMagicCommentViolation]) | 61 | 4 |
wemake-services/wemake-python-styleguide | train | 492 | dd5bfe897e71a910839506a2645e596f6b83ab4a | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 317 | 8 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors | modified | cb34587a943ef9a30033f331f52eb4231f7e63410e2dc0e3dc678c99c682e30e | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors | 316 | 8 | |
wemake-services/wemake-python-styleguide | train | 492 | dd5bfe897e71a910839506a2645e596f6b83ab4a | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 318 | 8 | assert | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | errors.get(found_error) | modified | 2abaa7c113516dcf69f23d9df2fbbf24ab30ad69f2bc02db5601fb00eefd3ba8 | assert||""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contrib... | errors.get(found_error) | 317 | 8 | |
wemake-services/wemake-python-styleguide | train | 492 | dd5bfe897e71a910839506a2645e596f6b83ab4a | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 327 | 4 | assert | test_codes | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_violations) | modified | ff741294d1dfb0cc2a70800ef0c1f8cb1137424677569454324b71816e2999d1 | assert|test_codes|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-stylegui.de/en/latest/pages/a... | len(all_violations) | 326 | 4 |
wemake-services/wemake-python-styleguide | train | 492 | dd5bfe897e71a910839506a2645e596f6b83ab4a | train | tests/test_checker/test_noqa.py | test | wemake-services/wemake-python-styleguide:tests/test_checker/test_noqa.py | 401 | 4 | assert | test_noqa_fixture_disabled_no_control | """
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/latest/pages/api/contributing... | len(all_controlled_violations) | modified | f61f55d90e1ea5686e976910f1a5658f9e35c624ba97d71d2a2e8f69bd9cbaf2 | assert|test_noqa_fixture_disabled_no_control|""" Integration tests definition. These are integration tests for several things: 1. that violation is active and enabled 2. that violation is raised for the bad code 3. that line number where violation is raised is correct 4. that `noqa` works Docs: https://wemake-python-st... | len(all_controlled_violations) | 400 | 4 |
wemake-services/wemake-python-styleguide | train | 492 | dd5bfe897e71a910839506a2645e596f6b83ab4a | train | tests/test_visitors/test_ast/test_operators/test_bitwise_boolean_mixup.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_operators/test_bitwise_boolean_mixup.py | 36 | 4 | assert_* | test_bitwise_boolean_mixup | import pytest
from wemake_python_styleguide.violations.best_practices import (
BitwiseAndBooleanMixupViolation,
)
from wemake_python_styleguide.visitors.ast.operators import BitwiseOpVisitor
# add more cases for more usages of mixup
@pytest.mark.parametrize('expression', [
'True | False',
'(x >= y) & Tr... | [BitwiseAndBooleanMixupViolation]) | added | b847422b0598c8768f924f1467b0cc3092c127f7f59b263cb5906b4cbf431320 | assert_*|test_bitwise_boolean_mixup|import pytest from wemake_python_styleguide.violations.best_practices import ( BitwiseAndBooleanMixupViolation, ) from wemake_python_styleguide.visitors.ast.operators import BitwiseOpVisitor # add more cases for more usages of mixup @pytest.mark.parametrize('expression', [ 'True | Fa... | null | null | null |
wemake-services/wemake-python-styleguide | train | 493 | ed540dfd0aeafebf702433ee56a6915d767c9889 | train | tests/test_checker/test_hypothesis.py | train | wemake-services/wemake-python-styleguide:tests/test_checker/test_hypothesis.py | 67 | 8 | assert | test_no_exceptions | """
Integration test that our linter does not break on different random programs.
We generate thousands of them with the help of ``hypothesis`` and ensure
that they are parsed and processed correctly.
We cannot tell whether or not violations are correctly shown by a random input,
but we can tell that our program did ... | violation[2].startswith('WPS') | modified | b91d626f64361ca320e01d30fbd7cb75ba0b12852f59ad92aefc086a0b927267 | assert|test_no_exceptions|""" Integration test that our linter does not break on different random programs. We generate thousands of them with the help of ``hypothesis`` and ensure that they are parsed and processed correctly. We cannot tell whether or not violations are correctly shown by a random input, but we can te... | violation[2].startswith('WPS') | 67 | 8 |
wemake-services/wemake-python-styleguide | train | 493 | ed540dfd0aeafebf702433ee56a6915d767c9889 | 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 | 78 | 4 | assert_* | test_wrong_return_annotation | 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: ...
"""
correct_compound_return = ""... | [MultilineFunctionAnnotationViolation]) | modified | 4fab41187e76b77d6f9aad9c56fe47a1b5b2f65c6077a1ef59ed5b5a794bacd9 | assert_*|test_wrong_return_annotation|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]) | 78 | 4 |
wemake-services/wemake-python-styleguide | train | 493 | ed540dfd0aeafebf702433ee56a6915d767c9889 | 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 | 143 | 4 | assert_* | test_block_overlap | import pytest
from wemake_python_styleguide.compat.constants import PY38
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: ... | [BlockAndLocalOverlapViolation]) | modified | e7c6743c0b546c5fa8e2fac3cb6281ce5d9482aa12cda48eaf2a64d7f1f42c51 | assert_*|test_block_overlap|import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.violations.best_practices import ( BlockAndLocalOverlapViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Wrong: import_and_class1 = """ import ove... | [BlockAndLocalOverlapViolation]) | 143 | 4 |
wemake-services/wemake-python-styleguide | train | 493 | ed540dfd0aeafebf702433ee56a6915d767c9889 | 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 | 80 | 4 | assert_* | test_for_block_overlap | 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 = 'for first, *{0} in some():'... | [BlockAndLocalOverlapViolation]) | modified | aa39c7cc022f3378c66a2821b0b4451aa92f158e095ba76d65f129412751af11 | assert_*|test_for_block_overlap|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]) | 80 | 4 |
wemake-services/wemake-python-styleguide | train | 493 | ed540dfd0aeafebf702433ee56a6915d767c9889 | train | tests/test_visitors/test_ast/test_blocks/test_overlap/test_try_block.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_blocks/test_overlap/test_try_block.py | 155 | 4 | assert_* | test_except_block_overlap | import pytest
from wemake_python_styleguide.violations.best_practices import (
BlockAndLocalOverlapViolation,
)
from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor
# Exception handling:
except_block1 = 'except Exception as {0}:'
except_block2 = 'except (TypeError, ValueError) as {0}:'
... | [BlockAndLocalOverlapViolation]) | modified | 09a36e09190df96ad11f3cd638d20a7cccd3e6d71761db99e624834354c4e5e1 | assert_*|test_except_block_overlap|import pytest from wemake_python_styleguide.violations.best_practices import ( BlockAndLocalOverlapViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Exception handling: except_block1 = 'except Exception as {0}:' except_block2 = 'except (TypeE... | [BlockAndLocalOverlapViolation]) | 155 | 4 |
wemake-services/wemake-python-styleguide | train | 493 | ed540dfd0aeafebf702433ee56a6915d767c9889 | train | tests/test_visitors/test_ast/test_classes/test_base_classes/test_object_base_class.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_classes/test_base_classes/test_object_base_class.py | 64 | 4 | assert_* | test_wrong_base_class | import pytest
from wemake_python_styleguide.violations.consistency import (
RequiredBaseClassViolation,
)
from wemake_python_styleguide.visitors.ast.classes import WrongClassVisitor
class_without_base = """
class Meta:
'''Docs.'''
"""
class_with_empty_base = """
class Meta():
'''Docs.'''
"""
nested_clas... | 'Meta') | modified | bdd80d2b1751764ef797165f34674babd1c973d47005bc175ab63d4e8a7c7820 | assert_*|test_wrong_base_class|import pytest from wemake_python_styleguide.violations.consistency import ( RequiredBaseClassViolation, ) from wemake_python_styleguide.visitors.ast.classes import WrongClassVisitor class_without_base = """ class Meta: '''Docs.''' """ class_with_empty_base = """ class Meta(): '''Docs.''' ... | 'Meta') | 64 | 4 |
wemake-services/wemake-python-styleguide | train | 493 | ed540dfd0aeafebf702433ee56a6915d767c9889 | train | tests/test_visitors/test_ast/test_compares/test_constant_compares/test_falsy_constant.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_compares/test_constant_compares/test_falsy_constant.py | 49 | 4 | assert_* | test_falsy_constant | import pytest
from wemake_python_styleguide.compat.constants import PY38
from wemake_python_styleguide.violations.refactoring import (
FalsyConstantCompareViolation,
WrongIsCompareViolation,
)
from wemake_python_styleguide.visitors.ast.compares import (
WrongConstantCompareVisitor,
)
wrong_comparators = [... | [FalsyConstantCompareViolation]) | modified | 5d08120c7df5097e281d66e25efe4d1d29367b555521e23fa8fb9cdea450adc4 | assert_*|test_falsy_constant|import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.violations.refactoring import ( FalsyConstantCompareViolation, WrongIsCompareViolation, ) from wemake_python_styleguide.visitors.ast.compares import ( WrongConstantCompareVisitor, ) wrong_... | [FalsyConstantCompareViolation]) | 49 | 4 |
wemake-services/wemake-python-styleguide | train | 493 | ed540dfd0aeafebf702433ee56a6915d767c9889 | train | tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_string_multiline.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_tokenize/test_primitives/test_string_tokens/test_string_multiline.py | 78 | 4 | assert_* | test_incorrect_multiline_strings | import pytest
from wemake_python_styleguide.violations.consistency import (
RawStringNotNeededViolation,
WrongMultilineStringViolation,
)
from wemake_python_styleguide.visitors.tokenize.primitives import (
WrongStringTokenVisitor,
)
multiline_single = """'''
abc
'''"""
multiline_double = '''"""
abc
"""''... | [WrongMultilineStringViolation]) | modified | 3373210e3d068339d5f0b5fb1c7f2c0d56be95f52503c12e12d20e764f8ecec9 | assert_*|test_incorrect_multiline_strings|import pytest from wemake_python_styleguide.violations.consistency import ( RawStringNotNeededViolation, WrongMultilineStringViolation, ) from wemake_python_styleguide.visitors.tokenize.primitives import ( WrongStringTokenVisitor, ) multiline_single = """''' abc '''""" multilin... | [WrongMultilineStringViolation]) | 78 | 4 |
wemake-services/wemake-python-styleguide | train | 494 | 579a7fa4fa59f44464c97d884f88284039b56f09 | train | tests/test_visitors/test_ast/test_functions/test_call_context/test_range_len.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_functions/test_call_context/test_range_len.py | 58 | 4 | assert_* | test_range_len | import pytest
from wemake_python_styleguide.violations.refactoring import (
ImplicitEnumerateViolation,
)
from wemake_python_styleguide.visitors.ast.functions import (
WrongFunctionCallContextVisitior,
)
@pytest.mark.parametrize('code', [
'range(10)',
'range(10, 20)',
'range(0, 10, 1)',
'rang... | [ImplicitEnumerateViolation]) | modified | 0d519492007fbb40c570eb244fac36a7067bb011e4e548ccb0774a890169c9e3 | assert_*|test_range_len|import pytest from wemake_python_styleguide.violations.refactoring import ( ImplicitEnumerateViolation, ) from wemake_python_styleguide.visitors.ast.functions import ( WrongFunctionCallContextVisitior, ) @pytest.mark.parametrize('code', [ 'range(10)', 'range(10, 20)', 'range(0, 10, 1)', 'range(s... | [ImplicitEnumerateViolation]) | 56 | 4 |
wemake-services/wemake-python-styleguide | train | 495 | e060f74cd94f7ec378f8c849657e21fed4edc98d | train | tests/test_regressions/test_regression112.py | train | wemake-services/wemake-python-styleguide:tests/test_regressions/test_regression112.py | 51 | 4 | assert | test_regression112 | import ast
from pyflakes.checker import Checker as PyFlakesChecker
from wemake_python_styleguide.checker import Checker
code_that_breaks = '''
def current_session(
telegram_id: int,
for_update: bool = True,
) -> TelegramSession:
"""
Was triggering `AttributeError`.
See: https://github.com/wemake... | None | modified | 7aee105f81abadf2e39c7d699645867f272c4a6461fa60a872c0232ca58c4a39 | assert|test_regression112|import ast from pyflakes.checker import Checker as PyFlakesChecker from wemake_python_styleguide.checker import Checker code_that_breaks = ''' def current_session( telegram_id: int, for_update: bool = True, ) -> TelegramSession: """ Was triggering `AttributeError`. See: https://github.com/wema... | None | 51 | 4 |
wemake-services/wemake-python-styleguide | train | 495 | e060f74cd94f7ec378f8c849657e21fed4edc98d | train | tests/test_visitors/test_ast/test_blocks/test_outer_scope_shadow.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_blocks/test_outer_scope_shadow.py | 324 | 4 | assert_* | test_outer_variable_shadow | import pytest
from wemake_python_styleguide.compat.constants import PY38
from wemake_python_styleguide.violations.best_practices import (
OuterScopeShadowingViolation,
)
from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor
# Correct:
correct_for_loop1 = """
import ast
def wrapper():
... | [OuterScopeShadowingViolation]) | modified | ae4e4d98445c3393b91782fec000aad23bf746fa0e03bba46a4c19ec547f77a1 | assert_*|test_outer_variable_shadow|import pytest from wemake_python_styleguide.compat.constants import PY38 from wemake_python_styleguide.violations.best_practices import ( OuterScopeShadowingViolation, ) from wemake_python_styleguide.visitors.ast.blocks import BlockVariableVisitor # Correct: correct_for_loop1 = """ i... | [OuterScopeShadowingViolation]) | 324 | 4 |
wemake-services/wemake-python-styleguide | train | 495 | e060f74cd94f7ec378f8c849657e21fed4edc98d | train | tests/test_visitors/test_ast/test_builtins/test_strings/test_alphabet_string.py | val | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_alphabet_string.py | 60 | 4 | assert_* | test_alphabet_as_fstring_violation | import string
import pytest
from wemake_python_styleguide.violations.best_practices import (
StringConstantRedefinedViolation,
)
from wemake_python_styleguide.violations.consistency import (
FormattedStringViolation,
)
from wemake_python_styleguide.visitors.ast.builtins import WrongStringVisitor
@pytest.mar... | ( FormattedStringViolation, )) | modified | b05c0f5927452e9e4b276848b3de470cf3acb76386aa43713f14491dfc3e1c09 | assert_*|test_alphabet_as_fstring_violation|import string import pytest from wemake_python_styleguide.violations.best_practices import ( StringConstantRedefinedViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins impor... | ( FormattedStringViolation, )) | 60 | 4 |
wemake-services/wemake-python-styleguide | train | 495 | e060f74cd94f7ec378f8c849657e21fed4edc98d | train | tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | train | wemake-services/wemake-python-styleguide:tests/test_visitors/test_ast/test_builtins/test_strings/test_formatted_string.py | 118 | 4 | assert_* | test_complex_f_string | import pytest
from wemake_python_styleguide.violations.complexity import (
TooComplexFormattedStringViolation,
)
from wemake_python_styleguide.violations.consistency import (
FormattedStringViolation,
)
from wemake_python_styleguide.visitors.ast.builtins import (
WrongFormatStringVisitor,
WrongStringVi... | [TooComplexFormattedStringViolation]) | modified | 3d21cfb49a1ac532edf0d3dc4524da80727801eb77b365f245f50217423c8a3e | assert_*|test_complex_f_string|import pytest from wemake_python_styleguide.violations.complexity import ( TooComplexFormattedStringViolation, ) from wemake_python_styleguide.violations.consistency import ( FormattedStringViolation, ) from wemake_python_styleguide.visitors.ast.builtins import ( WrongFormatStringVisitor,... | [TooComplexFormattedStringViolation]) | 118 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.