From 5a11ecf261134e9785688821f80cc0094e91fe33 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Thu, 15 Dec 2022 10:46:49 +0100 Subject: [PATCH 1/3] [refactor] Move 'duplicate' functional tests to their own directory --- tests/functional/d/{ => duplicate}/duplicate_argument_name.py | 0 tests/functional/d/{ => duplicate}/duplicate_argument_name.txt | 0 tests/functional/d/{ => duplicate}/duplicate_argument_name_py3.py | 0 .../functional/d/{ => duplicate}/duplicate_argument_name_py3.txt | 0 tests/functional/d/{ => duplicate}/duplicate_bases.py | 0 tests/functional/d/{ => duplicate}/duplicate_bases.txt | 0 tests/functional/d/{ => duplicate}/duplicate_dict_literal_key.py | 0 tests/functional/d/{ => duplicate}/duplicate_dict_literal_key.txt | 0 tests/functional/d/{ => duplicate}/duplicate_except.py | 0 tests/functional/d/{ => duplicate}/duplicate_except.txt | 0 .../d/{ => duplicate}/duplicate_string_formatting_argument.py | 0 .../d/{ => duplicate}/duplicate_string_formatting_argument.txt | 0 tests/functional/d/{ => duplicate}/duplicate_value.py | 0 tests/functional/d/{ => duplicate}/duplicate_value.txt | 0 14 files changed, 0 insertions(+), 0 deletions(-) rename tests/functional/d/{ => duplicate}/duplicate_argument_name.py (100%) rename tests/functional/d/{ => duplicate}/duplicate_argument_name.txt (100%) rename tests/functional/d/{ => duplicate}/duplicate_argument_name_py3.py (100%) rename tests/functional/d/{ => duplicate}/duplicate_argument_name_py3.txt (100%) rename tests/functional/d/{ => duplicate}/duplicate_bases.py (100%) rename tests/functional/d/{ => duplicate}/duplicate_bases.txt (100%) rename tests/functional/d/{ => duplicate}/duplicate_dict_literal_key.py (100%) rename tests/functional/d/{ => duplicate}/duplicate_dict_literal_key.txt (100%) rename tests/functional/d/{ => duplicate}/duplicate_except.py (100%) rename tests/functional/d/{ => duplicate}/duplicate_except.txt (100%) rename tests/functional/d/{ => duplicate}/duplicate_string_formatting_argument.py (100%) rename tests/functional/d/{ => duplicate}/duplicate_string_formatting_argument.txt (100%) rename tests/functional/d/{ => duplicate}/duplicate_value.py (100%) rename tests/functional/d/{ => duplicate}/duplicate_value.txt (100%) diff --git a/tests/functional/d/duplicate_argument_name.py b/tests/functional/d/duplicate/duplicate_argument_name.py similarity index 100% rename from tests/functional/d/duplicate_argument_name.py rename to tests/functional/d/duplicate/duplicate_argument_name.py diff --git a/tests/functional/d/duplicate_argument_name.txt b/tests/functional/d/duplicate/duplicate_argument_name.txt similarity index 100% rename from tests/functional/d/duplicate_argument_name.txt rename to tests/functional/d/duplicate/duplicate_argument_name.txt diff --git a/tests/functional/d/duplicate_argument_name_py3.py b/tests/functional/d/duplicate/duplicate_argument_name_py3.py similarity index 100% rename from tests/functional/d/duplicate_argument_name_py3.py rename to tests/functional/d/duplicate/duplicate_argument_name_py3.py diff --git a/tests/functional/d/duplicate_argument_name_py3.txt b/tests/functional/d/duplicate/duplicate_argument_name_py3.txt similarity index 100% rename from tests/functional/d/duplicate_argument_name_py3.txt rename to tests/functional/d/duplicate/duplicate_argument_name_py3.txt diff --git a/tests/functional/d/duplicate_bases.py b/tests/functional/d/duplicate/duplicate_bases.py similarity index 100% rename from tests/functional/d/duplicate_bases.py rename to tests/functional/d/duplicate/duplicate_bases.py diff --git a/tests/functional/d/duplicate_bases.txt b/tests/functional/d/duplicate/duplicate_bases.txt similarity index 100% rename from tests/functional/d/duplicate_bases.txt rename to tests/functional/d/duplicate/duplicate_bases.txt diff --git a/tests/functional/d/duplicate_dict_literal_key.py b/tests/functional/d/duplicate/duplicate_dict_literal_key.py similarity index 100% rename from tests/functional/d/duplicate_dict_literal_key.py rename to tests/functional/d/duplicate/duplicate_dict_literal_key.py diff --git a/tests/functional/d/duplicate_dict_literal_key.txt b/tests/functional/d/duplicate/duplicate_dict_literal_key.txt similarity index 100% rename from tests/functional/d/duplicate_dict_literal_key.txt rename to tests/functional/d/duplicate/duplicate_dict_literal_key.txt diff --git a/tests/functional/d/duplicate_except.py b/tests/functional/d/duplicate/duplicate_except.py similarity index 100% rename from tests/functional/d/duplicate_except.py rename to tests/functional/d/duplicate/duplicate_except.py diff --git a/tests/functional/d/duplicate_except.txt b/tests/functional/d/duplicate/duplicate_except.txt similarity index 100% rename from tests/functional/d/duplicate_except.txt rename to tests/functional/d/duplicate/duplicate_except.txt diff --git a/tests/functional/d/duplicate_string_formatting_argument.py b/tests/functional/d/duplicate/duplicate_string_formatting_argument.py similarity index 100% rename from tests/functional/d/duplicate_string_formatting_argument.py rename to tests/functional/d/duplicate/duplicate_string_formatting_argument.py diff --git a/tests/functional/d/duplicate_string_formatting_argument.txt b/tests/functional/d/duplicate/duplicate_string_formatting_argument.txt similarity index 100% rename from tests/functional/d/duplicate_string_formatting_argument.txt rename to tests/functional/d/duplicate/duplicate_string_formatting_argument.txt diff --git a/tests/functional/d/duplicate_value.py b/tests/functional/d/duplicate/duplicate_value.py similarity index 100% rename from tests/functional/d/duplicate_value.py rename to tests/functional/d/duplicate/duplicate_value.py diff --git a/tests/functional/d/duplicate_value.txt b/tests/functional/d/duplicate/duplicate_value.txt similarity index 100% rename from tests/functional/d/duplicate_value.txt rename to tests/functional/d/duplicate/duplicate_value.txt From 3c67b4e4fa20a47856195c7a6d9f69f20a004e51 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Thu, 15 Dec 2022 10:49:26 +0100 Subject: [PATCH 2/3] [refactor] Move 'dataclass' functional tests to their own directory --- .../d/{ => dataclass}/dataclass_kw_only.py | 0 .../d/{ => dataclass}/dataclass_kw_only.rc | 0 .../d/{ => dataclass}/dataclass_kw_only.txt | 0 .../d/{ => dataclass}/dataclass_parameter.py | 0 .../d/{ => dataclass}/dataclass_parameter.rc | 0 .../d/{ => dataclass}/dataclass_typecheck.py | 6 ++++++ .../d/{ => dataclass}/dataclass_typecheck.rc | 0 tests/functional/d/dataclass/dataclass_typecheck.txt | 12 ++++++++++++ .../dataclass_with_default_factory.py | 0 .../dataclass_with_default_factory.rc | 0 .../dataclass_with_default_factory.txt | 0 .../d/{ => dataclass}/dataclass_with_field.py | 0 .../d/{ => dataclass}/dataclass_with_field.rc | 0 .../d/{ => dataclass}/dataclass_with_field.txt | 0 tests/functional/d/dataclass_typecheck.txt | 12 ------------ 15 files changed, 18 insertions(+), 12 deletions(-) rename tests/functional/d/{ => dataclass}/dataclass_kw_only.py (100%) rename tests/functional/d/{ => dataclass}/dataclass_kw_only.rc (100%) rename tests/functional/d/{ => dataclass}/dataclass_kw_only.txt (100%) rename tests/functional/d/{ => dataclass}/dataclass_parameter.py (100%) rename tests/functional/d/{ => dataclass}/dataclass_parameter.rc (100%) rename tests/functional/d/{ => dataclass}/dataclass_typecheck.py (94%) rename tests/functional/d/{ => dataclass}/dataclass_typecheck.rc (100%) create mode 100644 tests/functional/d/dataclass/dataclass_typecheck.txt rename tests/functional/d/{ => dataclass}/dataclass_with_default_factory.py (100%) rename tests/functional/d/{ => dataclass}/dataclass_with_default_factory.rc (100%) rename tests/functional/d/{ => dataclass}/dataclass_with_default_factory.txt (100%) rename tests/functional/d/{ => dataclass}/dataclass_with_field.py (100%) rename tests/functional/d/{ => dataclass}/dataclass_with_field.rc (100%) rename tests/functional/d/{ => dataclass}/dataclass_with_field.txt (100%) delete mode 100644 tests/functional/d/dataclass_typecheck.txt diff --git a/tests/functional/d/dataclass_kw_only.py b/tests/functional/d/dataclass/dataclass_kw_only.py similarity index 100% rename from tests/functional/d/dataclass_kw_only.py rename to tests/functional/d/dataclass/dataclass_kw_only.py diff --git a/tests/functional/d/dataclass_kw_only.rc b/tests/functional/d/dataclass/dataclass_kw_only.rc similarity index 100% rename from tests/functional/d/dataclass_kw_only.rc rename to tests/functional/d/dataclass/dataclass_kw_only.rc diff --git a/tests/functional/d/dataclass_kw_only.txt b/tests/functional/d/dataclass/dataclass_kw_only.txt similarity index 100% rename from tests/functional/d/dataclass_kw_only.txt rename to tests/functional/d/dataclass/dataclass_kw_only.txt diff --git a/tests/functional/d/dataclass_parameter.py b/tests/functional/d/dataclass/dataclass_parameter.py similarity index 100% rename from tests/functional/d/dataclass_parameter.py rename to tests/functional/d/dataclass/dataclass_parameter.py diff --git a/tests/functional/d/dataclass_parameter.rc b/tests/functional/d/dataclass/dataclass_parameter.rc similarity index 100% rename from tests/functional/d/dataclass_parameter.rc rename to tests/functional/d/dataclass/dataclass_parameter.rc diff --git a/tests/functional/d/dataclass_typecheck.py b/tests/functional/d/dataclass/dataclass_typecheck.py similarity index 94% rename from tests/functional/d/dataclass_typecheck.py rename to tests/functional/d/dataclass/dataclass_typecheck.py index f15bfead43..fbd7707049 100644 --- a/tests/functional/d/dataclass_typecheck.py +++ b/tests/functional/d/dataclass/dataclass_typecheck.py @@ -2,7 +2,13 @@ Tests for regressions from https://github.com/PyCQA/astroid/pull/1126 """ + # pylint: disable=missing-docstring,too-few-public-methods,pointless-statement,redefined-builtin, fixme + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + from dataclasses import dataclass from typing import Callable, Dict, List, Optional diff --git a/tests/functional/d/dataclass_typecheck.rc b/tests/functional/d/dataclass/dataclass_typecheck.rc similarity index 100% rename from tests/functional/d/dataclass_typecheck.rc rename to tests/functional/d/dataclass/dataclass_typecheck.rc diff --git a/tests/functional/d/dataclass/dataclass_typecheck.txt b/tests/functional/d/dataclass/dataclass_typecheck.txt new file mode 100644 index 0000000000..5afac5849c --- /dev/null +++ b/tests/functional/d/dataclass/dataclass_typecheck.txt @@ -0,0 +1,12 @@ +invalid-sequence-index:38:6:38:20::Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-slice-index:42:10:42:19::Slice index is not an int, None, or instance with __index__:UNDEFINED +not-callable:45:0:45:14::obj.attr1 is not callable:UNDEFINED +invalid-unary-operand-type:50:6:50:16::"bad operand type for unary -: str":UNDEFINED +unsupported-membership-test:57:11:57:20::Value 'obj.attr1' doesn't support membership test:UNDEFINED +unsubscriptable-object:62:6:62:15::Value 'obj.attr1' is unsubscriptable:UNDEFINED +unsupported-assignment-operation:67:0:67:9::'obj.attr1' does not support item assignment:UNDEFINED +unsupported-delete-operation:72:4:72:13::'obj.attr1' does not support item deletion:UNDEFINED +not-context-manager:97:0:98:8::Context manager 'str' doesn't implement __enter__ and __exit__.:UNDEFINED +invalid-metaclass:105:0:105:11:Test2:Invalid metaclass 'Instance of builtins.int' used:UNDEFINED +unhashable-member:111:0:111:2::'obj.attr5' is unhashable and can't be used as a key in a dict:INFERENCE +isinstance-second-argument-not-valid-type:121:6:121:30::Second argument of isinstance is not a type:UNDEFINED diff --git a/tests/functional/d/dataclass_with_default_factory.py b/tests/functional/d/dataclass/dataclass_with_default_factory.py similarity index 100% rename from tests/functional/d/dataclass_with_default_factory.py rename to tests/functional/d/dataclass/dataclass_with_default_factory.py diff --git a/tests/functional/d/dataclass_with_default_factory.rc b/tests/functional/d/dataclass/dataclass_with_default_factory.rc similarity index 100% rename from tests/functional/d/dataclass_with_default_factory.rc rename to tests/functional/d/dataclass/dataclass_with_default_factory.rc diff --git a/tests/functional/d/dataclass_with_default_factory.txt b/tests/functional/d/dataclass/dataclass_with_default_factory.txt similarity index 100% rename from tests/functional/d/dataclass_with_default_factory.txt rename to tests/functional/d/dataclass/dataclass_with_default_factory.txt diff --git a/tests/functional/d/dataclass_with_field.py b/tests/functional/d/dataclass/dataclass_with_field.py similarity index 100% rename from tests/functional/d/dataclass_with_field.py rename to tests/functional/d/dataclass/dataclass_with_field.py diff --git a/tests/functional/d/dataclass_with_field.rc b/tests/functional/d/dataclass/dataclass_with_field.rc similarity index 100% rename from tests/functional/d/dataclass_with_field.rc rename to tests/functional/d/dataclass/dataclass_with_field.rc diff --git a/tests/functional/d/dataclass_with_field.txt b/tests/functional/d/dataclass/dataclass_with_field.txt similarity index 100% rename from tests/functional/d/dataclass_with_field.txt rename to tests/functional/d/dataclass/dataclass_with_field.txt diff --git a/tests/functional/d/dataclass_typecheck.txt b/tests/functional/d/dataclass_typecheck.txt deleted file mode 100644 index fad9a5ef33..0000000000 --- a/tests/functional/d/dataclass_typecheck.txt +++ /dev/null @@ -1,12 +0,0 @@ -invalid-sequence-index:32:6:32:20::Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-slice-index:36:10:36:19::Slice index is not an int, None, or instance with __index__:UNDEFINED -not-callable:39:0:39:14::obj.attr1 is not callable:UNDEFINED -invalid-unary-operand-type:44:6:44:16::"bad operand type for unary -: str":UNDEFINED -unsupported-membership-test:51:11:51:20::Value 'obj.attr1' doesn't support membership test:UNDEFINED -unsubscriptable-object:56:6:56:15::Value 'obj.attr1' is unsubscriptable:UNDEFINED -unsupported-assignment-operation:61:0:61:9::'obj.attr1' does not support item assignment:UNDEFINED -unsupported-delete-operation:66:4:66:13::'obj.attr1' does not support item deletion:UNDEFINED -not-context-manager:91:0:92:8::Context manager 'str' doesn't implement __enter__ and __exit__.:UNDEFINED -invalid-metaclass:99:0:99:11:Test2:Invalid metaclass 'Instance of builtins.int' used:UNDEFINED -unhashable-member:105:0:105:2::'obj.attr5' is unhashable and can't be used as a key in a dict:INFERENCE -isinstance-second-argument-not-valid-type:115:6:115:30::Second argument of isinstance is not a type:UNDEFINED From 814ae244a991f7c735e775ed9edc462eeb2c0166 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Thu, 15 Dec 2022 10:50:34 +0100 Subject: [PATCH 3/3] [pypy3.8] Disable multiple-statements false positive on affected functional tests --- .../a/alternative/alternative_union_syntax.py | 2 + .../alternative_union_syntax_error.py | 14 ++- .../alternative_union_syntax_error.txt | 52 +++++----- .../alternative_union_syntax_py37.py | 13 ++- .../alternative_union_syntax_py37.txt | 18 ++-- .../ext/typing/typing_consider_using_alias.py | 6 ++ .../typing/typing_consider_using_alias.txt | 40 ++++---- ...ing_consider_using_alias_without_future.py | 9 +- ...ng_consider_using_alias_without_future.txt | 40 ++++---- .../ext/typing/typing_consider_using_union.py | 6 ++ .../typing/typing_consider_using_union.txt | 20 ++-- ...ing_consider_using_union_without_future.py | 6 ++ ...ng_consider_using_union_without_future.txt | 20 ++-- .../functional/i/invalid/invalid_metaclass.py | 4 + .../i/invalid/invalid_metaclass.txt | 12 +-- .../i/invalid/invalid_sequence_index.py | 6 +- .../i/invalid/invalid_sequence_index.txt | 38 +++---- .../functional/n/no/no_member_dataclasses.py | 9 +- .../functional/n/no/no_member_dataclasses.txt | 4 +- .../n/no/no_member_subclassed_dataclasses.py | 7 ++ .../n/no/no_member_subclassed_dataclasses.rc | 8 -- .../p/postponed_evaluation_pep585.py | 10 +- .../p/postponed_evaluation_pep585.txt | 38 +++---- .../p/postponed_evaluation_pep585_error.py | 10 +- .../p/postponed_evaluation_pep585_error.txt | 98 +++++++++---------- .../functional/r/redundant_unittest_assert.py | 15 ++- .../r/redundant_unittest_assert.txt | 12 +-- .../r/regression/regression_4439.py | 6 +- .../r/regression/regression_4439.txt | 2 +- .../s/subclassed_final_class_py38.py | 8 +- .../s/subclassed_final_class_py38.txt | 2 +- .../t/too/too_few_public_methods_37.py | 5 + .../t/too/too_many_instance_attributes.py | 4 + .../t/too/too_many_instance_attributes.txt | 2 +- .../too/too_many_instance_attributes_py37.py | 13 ++- .../unpacking/unpacking_non_sequence_py37.py | 9 +- 36 files changed, 338 insertions(+), 230 deletions(-) diff --git a/tests/functional/a/alternative/alternative_union_syntax.py b/tests/functional/a/alternative/alternative_union_syntax.py index d25d9e8f43..33565223aa 100644 --- a/tests/functional/a/alternative/alternative_union_syntax.py +++ b/tests/functional/a/alternative/alternative_union_syntax.py @@ -1,6 +1,8 @@ """Test PEP 604 - Alternative Union syntax""" + # pylint: disable=missing-function-docstring,unused-argument,invalid-name,missing-class-docstring # pylint: disable=inherit-non-class,too-few-public-methods,unnecessary-direct-lambda-call,superfluous-parens + import dataclasses import typing from dataclasses import dataclass diff --git a/tests/functional/a/alternative/alternative_union_syntax_error.py b/tests/functional/a/alternative/alternative_union_syntax_error.py index 9d1f42c225..d998b7f004 100644 --- a/tests/functional/a/alternative/alternative_union_syntax_error.py +++ b/tests/functional/a/alternative/alternative_union_syntax_error.py @@ -1,10 +1,18 @@ -"""Test PEP 604 - Alternative Union syntax -without postponed evaluation of annotations. +"""Test PEP 604 - Alternative Union syntax with postponed evaluation of +annotations enabled. For Python 3.7 - 3.9: Everything should fail. Testing only 3.8/3.9 to support TypedDict. """ -# pylint: disable=missing-function-docstring,unused-argument,invalid-name,missing-class-docstring,inherit-non-class,too-few-public-methods,line-too-long,unnecessary-direct-lambda-call,unnecessary-lambda-assignment + +# pylint: disable=missing-function-docstring,unused-argument,invalid-name,missing-class-docstring +# pylint: disable=inherit-non-class,too-few-public-methods,line-too-long,unnecessary-direct-lambda-call +# pylint: disable=unnecessary-lambda-assignment + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + import dataclasses import typing from dataclasses import dataclass diff --git a/tests/functional/a/alternative/alternative_union_syntax_error.txt b/tests/functional/a/alternative/alternative_union_syntax_error.txt index 25a768fa3e..6f4c19a4e4 100644 --- a/tests/functional/a/alternative/alternative_union_syntax_error.txt +++ b/tests/functional/a/alternative/alternative_union_syntax_error.txt @@ -1,26 +1,26 @@ -unsupported-binary-operation:14:8:14:30::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:15:7:15:35::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:17:23:17:33::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:18:6:18:22::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:18:6:18:15::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:19:6:19:34::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:20:18:20:46::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:23:23:23:32::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:25:24:25:33::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:27:14:27:23::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:29:5:29:14::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:31:14:31:23:func:unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:34:15:34:24:func2:unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:40:9:40:25::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:47:36:47:45::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:50:12:50:21:CustomNamedTuple2:unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:53:12:53:21:CustomNamedTuple3:unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:57:54:57:63::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:59:60:59:69::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:62:12:62:21:CustomTypedDict3:unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:65:12:65:21:CustomTypedDict4:unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:76:12:76:21:CustomDataClass:unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:80:12:80:21:CustomDataClass2:unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:84:12:84:21:CustomDataClass3:unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:89:12:89:21:CustomDataClass4:unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:111:31:111:61::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:22:8:22:30::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:23:7:23:35::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:25:23:25:33::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:26:6:26:22::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:26:6:26:15::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:27:6:27:34::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:28:18:28:46::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:31:23:31:32::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:33:24:33:33::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:35:14:35:23::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:37:5:37:14::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:39:14:39:23:func:unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:42:15:42:24:func2:unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:48:9:48:25::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:55:36:55:45::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:58:12:58:21:CustomNamedTuple2:unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:61:12:61:21:CustomNamedTuple3:unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:65:54:65:63::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:67:60:67:69::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:70:12:70:21:CustomTypedDict3:unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:73:12:73:21:CustomTypedDict4:unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:84:12:84:21:CustomDataClass:unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:88:12:88:21:CustomDataClass2:unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:92:12:92:21:CustomDataClass3:unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:97:12:97:21:CustomDataClass4:unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:119:31:119:61::unsupported operand type(s) for |:INFERENCE diff --git a/tests/functional/a/alternative/alternative_union_syntax_py37.py b/tests/functional/a/alternative/alternative_union_syntax_py37.py index 3d9e577f14..41eb75ec6f 100644 --- a/tests/functional/a/alternative/alternative_union_syntax_py37.py +++ b/tests/functional/a/alternative/alternative_union_syntax_py37.py @@ -1,10 +1,17 @@ -"""Test PEP 604 - Alternative Union syntax -with postponed evaluation of annotations enabled. +"""Test PEP 604 - Alternative Union syntax with postponed evaluation of +annotations enabled. For Python 3.7 - 3.9: Most things should work. Testing only 3.8/3.9 to support TypedDict. """ -# pylint: disable=missing-function-docstring,unused-argument,invalid-name,missing-class-docstring,inherit-non-class,too-few-public-methods,line-too-long,unnecessary-direct-lambda-call + +# pylint: disable=missing-function-docstring,unused-argument,invalid-name,missing-class-docstring +# pylint: disable=inherit-non-class,too-few-public-methods,line-too-long,unnecessary-direct-lambda-call + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + from __future__ import annotations import dataclasses import typing diff --git a/tests/functional/a/alternative/alternative_union_syntax_py37.txt b/tests/functional/a/alternative/alternative_union_syntax_py37.txt index d00b450efd..37901192c1 100644 --- a/tests/functional/a/alternative/alternative_union_syntax_py37.txt +++ b/tests/functional/a/alternative/alternative_union_syntax_py37.txt @@ -1,9 +1,9 @@ -unsupported-binary-operation:15:8:15:30::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:16:7:16:35::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:24:23:24:32::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:26:24:26:33::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:28:14:28:23::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:41:9:41:25::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:48:36:48:45::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:58:54:58:63::unsupported operand type(s) for |:INFERENCE -unsupported-binary-operation:60:60:60:69::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:22:8:22:30::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:23:7:23:35::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:31:23:31:32::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:33:24:33:33::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:35:14:35:23::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:48:9:48:25::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:55:36:55:45::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:65:54:65:63::unsupported operand type(s) for |:INFERENCE +unsupported-binary-operation:67:60:67:69::unsupported operand type(s) for |:INFERENCE diff --git a/tests/functional/ext/typing/typing_consider_using_alias.py b/tests/functional/ext/typing/typing_consider_using_alias.py index 9fe636a96f..8fe3b59186 100644 --- a/tests/functional/ext/typing/typing_consider_using_alias.py +++ b/tests/functional/ext/typing/typing_consider_using_alias.py @@ -3,7 +3,13 @@ 'py-version' needs to be set to '3.7' or '3.8' and 'runtime-typing=no'. With 'from __future__ import annotations' present. """ + # pylint: disable=missing-docstring,invalid-name,unused-argument,line-too-long,unnecessary-direct-lambda-call + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + from __future__ import annotations import collections diff --git a/tests/functional/ext/typing/typing_consider_using_alias.txt b/tests/functional/ext/typing/typing_consider_using_alias.txt index 0845e2c9cd..2cd299d904 100644 --- a/tests/functional/ext/typing/typing_consider_using_alias.txt +++ b/tests/functional/ext/typing/typing_consider_using_alias.txt @@ -1,20 +1,20 @@ -consider-using-alias:16:6:16:17::'typing.Dict' will be deprecated with PY39, consider using 'dict' instead:INFERENCE -consider-using-alias:17:6:17:10::'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE -consider-using-alias:19:6:19:24::'typing.OrderedDict' will be deprecated with PY39, consider using 'collections.OrderedDict' instead:INFERENCE -consider-using-alias:20:6:20:22::'typing.Awaitable' will be deprecated with PY39, consider using 'collections.abc.Awaitable' instead:INFERENCE -consider-using-alias:21:6:21:21::'typing.Iterable' will be deprecated with PY39, consider using 'collections.abc.Iterable' instead:INFERENCE -consider-using-alias:22:6:22:21::'typing.Hashable' will be deprecated with PY39, consider using 'collections.abc.Hashable' instead:INFERENCE -consider-using-alias:23:6:23:27::'typing.ContextManager' will be deprecated with PY39, consider using 'contextlib.AbstractContextManager' instead:INFERENCE -consider-using-alias:24:6:24:20::'typing.Pattern' will be deprecated with PY39, consider using 're.Pattern' instead:INFERENCE -consider-using-alias:25:7:25:22::'typing.Match' will be deprecated with PY39, consider using 're.Match' instead:INFERENCE -consider-using-alias:34:9:34:13::'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE -consider-using-alias:36:7:36:11::'typing.Type' will be deprecated with PY39, consider using 'type' instead:INFERENCE -consider-using-alias:37:7:37:12::'typing.Tuple' will be deprecated with PY39, consider using 'tuple' instead:INFERENCE -consider-using-alias:38:7:38:15::'typing.Callable' will be deprecated with PY39, consider using 'collections.abc.Callable' instead:INFERENCE -consider-using-alias:44:74:44:78:func1:'typing.Dict' will be deprecated with PY39, consider using 'dict' instead:INFERENCE -consider-using-alias:44:16:44:20:func1:'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE -consider-using-alias:44:37:44:41:func1:'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE -consider-using-alias:44:93:44:105:func1:'typing.Tuple' will be deprecated with PY39, consider using 'tuple' instead:INFERENCE -consider-using-alias:60:12:60:16:CustomNamedTuple:'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE -consider-using-alias:65:12:65:16:CustomTypedDict2:'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE -consider-using-alias:69:12:69:16:CustomDataClass:'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE +consider-using-alias:22:6:22:17::'typing.Dict' will be deprecated with PY39, consider using 'dict' instead:INFERENCE +consider-using-alias:23:6:23:10::'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE +consider-using-alias:25:6:25:24::'typing.OrderedDict' will be deprecated with PY39, consider using 'collections.OrderedDict' instead:INFERENCE +consider-using-alias:26:6:26:22::'typing.Awaitable' will be deprecated with PY39, consider using 'collections.abc.Awaitable' instead:INFERENCE +consider-using-alias:27:6:27:21::'typing.Iterable' will be deprecated with PY39, consider using 'collections.abc.Iterable' instead:INFERENCE +consider-using-alias:28:6:28:21::'typing.Hashable' will be deprecated with PY39, consider using 'collections.abc.Hashable' instead:INFERENCE +consider-using-alias:29:6:29:27::'typing.ContextManager' will be deprecated with PY39, consider using 'contextlib.AbstractContextManager' instead:INFERENCE +consider-using-alias:30:6:30:20::'typing.Pattern' will be deprecated with PY39, consider using 're.Pattern' instead:INFERENCE +consider-using-alias:31:7:31:22::'typing.Match' will be deprecated with PY39, consider using 're.Match' instead:INFERENCE +consider-using-alias:40:9:40:13::'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE +consider-using-alias:42:7:42:11::'typing.Type' will be deprecated with PY39, consider using 'type' instead:INFERENCE +consider-using-alias:43:7:43:12::'typing.Tuple' will be deprecated with PY39, consider using 'tuple' instead:INFERENCE +consider-using-alias:44:7:44:15::'typing.Callable' will be deprecated with PY39, consider using 'collections.abc.Callable' instead:INFERENCE +consider-using-alias:50:74:50:78:func1:'typing.Dict' will be deprecated with PY39, consider using 'dict' instead:INFERENCE +consider-using-alias:50:16:50:20:func1:'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE +consider-using-alias:50:37:50:41:func1:'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE +consider-using-alias:50:93:50:105:func1:'typing.Tuple' will be deprecated with PY39, consider using 'tuple' instead:INFERENCE +consider-using-alias:66:12:66:16:CustomNamedTuple:'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE +consider-using-alias:71:12:71:16:CustomTypedDict2:'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE +consider-using-alias:75:12:75:16:CustomDataClass:'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE diff --git a/tests/functional/ext/typing/typing_consider_using_alias_without_future.py b/tests/functional/ext/typing/typing_consider_using_alias_without_future.py index 17daab9939..943a161887 100644 --- a/tests/functional/ext/typing/typing_consider_using_alias_without_future.py +++ b/tests/functional/ext/typing/typing_consider_using_alias_without_future.py @@ -2,7 +2,14 @@ 'py-version' needs to be set to '3.7' or '3.8' and 'runtime-typing=no'. """ -# pylint: disable=missing-docstring,invalid-name,unused-argument,line-too-long,unsubscriptable-object,unnecessary-direct-lambda-call + +# pylint: disable=missing-docstring,invalid-name,unused-argument,line-too-long,unsubscriptable-object +# pylint: disable=unnecessary-direct-lambda-call + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + import collections import collections.abc import typing diff --git a/tests/functional/ext/typing/typing_consider_using_alias_without_future.txt b/tests/functional/ext/typing/typing_consider_using_alias_without_future.txt index d7ed5fc845..7cf15a63c8 100644 --- a/tests/functional/ext/typing/typing_consider_using_alias_without_future.txt +++ b/tests/functional/ext/typing/typing_consider_using_alias_without_future.txt @@ -1,20 +1,20 @@ -consider-using-alias:13:6:13:17::'typing.Dict' will be deprecated with PY39, consider using 'dict' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:14:6:14:10::'typing.List' will be deprecated with PY39, consider using 'list' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:16:6:16:24::'typing.OrderedDict' will be deprecated with PY39, consider using 'collections.OrderedDict' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:17:6:17:22::'typing.Awaitable' will be deprecated with PY39, consider using 'collections.abc.Awaitable' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:18:6:18:21::'typing.Iterable' will be deprecated with PY39, consider using 'collections.abc.Iterable' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:19:6:19:21::'typing.Hashable' will be deprecated with PY39, consider using 'collections.abc.Hashable' instead:INFERENCE -consider-using-alias:20:6:20:27::'typing.ContextManager' will be deprecated with PY39, consider using 'contextlib.AbstractContextManager' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:21:6:21:20::'typing.Pattern' will be deprecated with PY39, consider using 're.Pattern' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:22:7:22:22::'typing.Match' will be deprecated with PY39, consider using 're.Match' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:31:9:31:13::'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE -consider-using-alias:33:7:33:11::'typing.Type' will be deprecated with PY39, consider using 'type' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:34:7:34:12::'typing.Tuple' will be deprecated with PY39, consider using 'tuple' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:35:7:35:15::'typing.Callable' will be deprecated with PY39, consider using 'collections.abc.Callable' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:41:74:41:78:func1:'typing.Dict' will be deprecated with PY39, consider using 'dict' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:41:16:41:20:func1:'typing.List' will be deprecated with PY39, consider using 'list' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:41:37:41:41:func1:'typing.List' will be deprecated with PY39, consider using 'list' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:41:93:41:105:func1:'typing.Tuple' will be deprecated with PY39, consider using 'tuple' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:57:12:57:16:CustomNamedTuple:'typing.List' will be deprecated with PY39, consider using 'list' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:62:12:62:16:CustomTypedDict2:'typing.List' will be deprecated with PY39, consider using 'list' instead. Add 'from __future__ import annotations' as well:INFERENCE -consider-using-alias:66:12:66:16:CustomDataClass:'typing.List' will be deprecated with PY39, consider using 'list' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:20:6:20:17::'typing.Dict' will be deprecated with PY39, consider using 'dict' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:21:6:21:10::'typing.List' will be deprecated with PY39, consider using 'list' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:23:6:23:24::'typing.OrderedDict' will be deprecated with PY39, consider using 'collections.OrderedDict' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:24:6:24:22::'typing.Awaitable' will be deprecated with PY39, consider using 'collections.abc.Awaitable' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:25:6:25:21::'typing.Iterable' will be deprecated with PY39, consider using 'collections.abc.Iterable' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:26:6:26:21::'typing.Hashable' will be deprecated with PY39, consider using 'collections.abc.Hashable' instead:INFERENCE +consider-using-alias:27:6:27:27::'typing.ContextManager' will be deprecated with PY39, consider using 'contextlib.AbstractContextManager' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:28:6:28:20::'typing.Pattern' will be deprecated with PY39, consider using 're.Pattern' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:29:7:29:22::'typing.Match' will be deprecated with PY39, consider using 're.Match' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:38:9:38:13::'typing.List' will be deprecated with PY39, consider using 'list' instead:INFERENCE +consider-using-alias:40:7:40:11::'typing.Type' will be deprecated with PY39, consider using 'type' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:41:7:41:12::'typing.Tuple' will be deprecated with PY39, consider using 'tuple' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:42:7:42:15::'typing.Callable' will be deprecated with PY39, consider using 'collections.abc.Callable' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:48:74:48:78:func1:'typing.Dict' will be deprecated with PY39, consider using 'dict' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:48:16:48:20:func1:'typing.List' will be deprecated with PY39, consider using 'list' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:48:37:48:41:func1:'typing.List' will be deprecated with PY39, consider using 'list' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:48:93:48:105:func1:'typing.Tuple' will be deprecated with PY39, consider using 'tuple' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:64:12:64:16:CustomNamedTuple:'typing.List' will be deprecated with PY39, consider using 'list' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:69:12:69:16:CustomTypedDict2:'typing.List' will be deprecated with PY39, consider using 'list' instead. Add 'from __future__ import annotations' as well:INFERENCE +consider-using-alias:73:12:73:16:CustomDataClass:'typing.List' will be deprecated with PY39, consider using 'list' instead. Add 'from __future__ import annotations' as well:INFERENCE diff --git a/tests/functional/ext/typing/typing_consider_using_union.py b/tests/functional/ext/typing/typing_consider_using_union.py index bb92e6fc70..780a961000 100644 --- a/tests/functional/ext/typing/typing_consider_using_union.py +++ b/tests/functional/ext/typing/typing_consider_using_union.py @@ -3,8 +3,14 @@ 'py-version' needs to be set to >= '3.7' and 'runtime-typing=no'. With 'from __future__ import annotations' present. """ + # pylint: disable=missing-docstring,invalid-name,unused-argument,line-too-long # pylint: disable=consider-using-alias,unnecessary-direct-lambda-call + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + from __future__ import annotations from dataclasses import dataclass import typing diff --git a/tests/functional/ext/typing/typing_consider_using_union.txt b/tests/functional/ext/typing/typing_consider_using_union.txt index 4a1e7521d2..5f2746815f 100644 --- a/tests/functional/ext/typing/typing_consider_using_union.txt +++ b/tests/functional/ext/typing/typing_consider_using_union.txt @@ -1,10 +1,10 @@ -consider-alternative-union-syntax:13:6:13:11::Consider using alternative Union syntax instead of 'Union':INFERENCE -consider-alternative-union-syntax:14:11:14:16::Consider using alternative Union syntax instead of 'Union':INFERENCE -consider-alternative-union-syntax:15:16:15:28::Consider using alternative Union syntax instead of 'Union':INFERENCE -consider-alternative-union-syntax:16:6:16:14::Consider using alternative Union syntax instead of 'Optional':INFERENCE -consider-alternative-union-syntax:24:10:24:18:func1:Consider using alternative Union syntax instead of 'Optional':INFERENCE -consider-alternative-union-syntax:25:24:25:29:func1:Consider using alternative Union syntax instead of 'Union':INFERENCE -consider-alternative-union-syntax:26:5:26:10:func1:Consider using alternative Union syntax instead of 'Union':INFERENCE -consider-alternative-union-syntax:38:12:38:17:CustomNamedTuple:Consider using alternative Union syntax instead of 'Union':INFERENCE -consider-alternative-union-syntax:43:27:43:32:CustomTypedDict2:Consider using alternative Union syntax instead of 'Union':INFERENCE -consider-alternative-union-syntax:47:12:47:20:CustomDataClass:Consider using alternative Union syntax instead of 'Optional':INFERENCE +consider-alternative-union-syntax:19:6:19:11::Consider using alternative Union syntax instead of 'Union':INFERENCE +consider-alternative-union-syntax:20:11:20:16::Consider using alternative Union syntax instead of 'Union':INFERENCE +consider-alternative-union-syntax:21:16:21:28::Consider using alternative Union syntax instead of 'Union':INFERENCE +consider-alternative-union-syntax:22:6:22:14::Consider using alternative Union syntax instead of 'Optional':INFERENCE +consider-alternative-union-syntax:30:10:30:18:func1:Consider using alternative Union syntax instead of 'Optional':INFERENCE +consider-alternative-union-syntax:31:24:31:29:func1:Consider using alternative Union syntax instead of 'Union':INFERENCE +consider-alternative-union-syntax:32:5:32:10:func1:Consider using alternative Union syntax instead of 'Union':INFERENCE +consider-alternative-union-syntax:44:12:44:17:CustomNamedTuple:Consider using alternative Union syntax instead of 'Union':INFERENCE +consider-alternative-union-syntax:49:27:49:32:CustomTypedDict2:Consider using alternative Union syntax instead of 'Union':INFERENCE +consider-alternative-union-syntax:53:12:53:20:CustomDataClass:Consider using alternative Union syntax instead of 'Optional':INFERENCE diff --git a/tests/functional/ext/typing/typing_consider_using_union_without_future.py b/tests/functional/ext/typing/typing_consider_using_union_without_future.py index 1fb43c65ac..d29ba306e9 100644 --- a/tests/functional/ext/typing/typing_consider_using_union_without_future.py +++ b/tests/functional/ext/typing/typing_consider_using_union_without_future.py @@ -2,8 +2,14 @@ 'py-version' needs to be set to >= '3.7' and 'runtime-typing=no'. """ + # pylint: disable=missing-docstring,invalid-name,unused-argument,line-too-long,unnecessary-direct-lambda-call # pylint: disable=consider-using-alias + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + from dataclasses import dataclass import typing from typing import Dict, List, Optional, Union, TypedDict diff --git a/tests/functional/ext/typing/typing_consider_using_union_without_future.txt b/tests/functional/ext/typing/typing_consider_using_union_without_future.txt index bc8ca4c075..5d48e9afca 100644 --- a/tests/functional/ext/typing/typing_consider_using_union_without_future.txt +++ b/tests/functional/ext/typing/typing_consider_using_union_without_future.txt @@ -1,10 +1,10 @@ -consider-alternative-union-syntax:11:6:11:11::Consider using alternative Union syntax instead of 'Union'. Add 'from __future__ import annotations' as well:INFERENCE -consider-alternative-union-syntax:12:11:12:16::Consider using alternative Union syntax instead of 'Union'. Add 'from __future__ import annotations' as well:INFERENCE -consider-alternative-union-syntax:13:16:13:28::Consider using alternative Union syntax instead of 'Union'. Add 'from __future__ import annotations' as well:INFERENCE -consider-alternative-union-syntax:14:6:14:14::Consider using alternative Union syntax instead of 'Optional'. Add 'from __future__ import annotations' as well:INFERENCE -consider-alternative-union-syntax:22:10:22:18:func1:Consider using alternative Union syntax instead of 'Optional'. Add 'from __future__ import annotations' as well:INFERENCE -consider-alternative-union-syntax:23:24:23:29:func1:Consider using alternative Union syntax instead of 'Union'. Add 'from __future__ import annotations' as well:INFERENCE -consider-alternative-union-syntax:24:5:24:10:func1:Consider using alternative Union syntax instead of 'Union'. Add 'from __future__ import annotations' as well:INFERENCE -consider-alternative-union-syntax:36:12:36:17:CustomNamedTuple:Consider using alternative Union syntax instead of 'Union'. Add 'from __future__ import annotations' as well:INFERENCE -consider-alternative-union-syntax:41:27:41:32:CustomTypedDict2:Consider using alternative Union syntax instead of 'Union'. Add 'from __future__ import annotations' as well:INFERENCE -consider-alternative-union-syntax:45:12:45:20:CustomDataClass:Consider using alternative Union syntax instead of 'Optional'. Add 'from __future__ import annotations' as well:INFERENCE +consider-alternative-union-syntax:17:6:17:11::Consider using alternative Union syntax instead of 'Union'. Add 'from __future__ import annotations' as well:INFERENCE +consider-alternative-union-syntax:18:11:18:16::Consider using alternative Union syntax instead of 'Union'. Add 'from __future__ import annotations' as well:INFERENCE +consider-alternative-union-syntax:19:16:19:28::Consider using alternative Union syntax instead of 'Union'. Add 'from __future__ import annotations' as well:INFERENCE +consider-alternative-union-syntax:20:6:20:14::Consider using alternative Union syntax instead of 'Optional'. Add 'from __future__ import annotations' as well:INFERENCE +consider-alternative-union-syntax:28:10:28:18:func1:Consider using alternative Union syntax instead of 'Optional'. Add 'from __future__ import annotations' as well:INFERENCE +consider-alternative-union-syntax:29:24:29:29:func1:Consider using alternative Union syntax instead of 'Union'. Add 'from __future__ import annotations' as well:INFERENCE +consider-alternative-union-syntax:30:5:30:10:func1:Consider using alternative Union syntax instead of 'Union'. Add 'from __future__ import annotations' as well:INFERENCE +consider-alternative-union-syntax:42:12:42:17:CustomNamedTuple:Consider using alternative Union syntax instead of 'Union'. Add 'from __future__ import annotations' as well:INFERENCE +consider-alternative-union-syntax:47:27:47:32:CustomTypedDict2:Consider using alternative Union syntax instead of 'Union'. Add 'from __future__ import annotations' as well:INFERENCE +consider-alternative-union-syntax:51:12:51:20:CustomDataClass:Consider using alternative Union syntax instead of 'Optional'. Add 'from __future__ import annotations' as well:INFERENCE diff --git a/tests/functional/i/invalid/invalid_metaclass.py b/tests/functional/i/invalid/invalid_metaclass.py index 1dc59791af..3b264d693e 100644 --- a/tests/functional/i/invalid/invalid_metaclass.py +++ b/tests/functional/i/invalid/invalid_metaclass.py @@ -1,5 +1,9 @@ # pylint: disable=missing-docstring, too-few-public-methods, import-error,unused-argument +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + import abc import six diff --git a/tests/functional/i/invalid/invalid_metaclass.txt b/tests/functional/i/invalid/invalid_metaclass.txt index 006065705e..21b31f3c6e 100644 --- a/tests/functional/i/invalid/invalid_metaclass.txt +++ b/tests/functional/i/invalid/invalid_metaclass.txt @@ -1,6 +1,6 @@ -invalid-metaclass:37:0:37:18:FirstInvalid:Invalid metaclass 'int' used:UNDEFINED -invalid-metaclass:41:0:41:19:SecondInvalid:Invalid metaclass 'InvalidAsMetaclass' used:UNDEFINED -invalid-metaclass:45:0:45:18:ThirdInvalid:Invalid metaclass '2' used:UNDEFINED -invalid-metaclass:49:0:49:19:FourthInvalid:Invalid metaclass 'Instance of invalid_metaclass.InvalidAsMetaclass' used:UNDEFINED -invalid-metaclass:61:0:61:13:Invalid:Invalid metaclass 'int' used:UNDEFINED -invalid-metaclass:65:0:65:19:InvalidSecond:Invalid metaclass '1' used:UNDEFINED +invalid-metaclass:41:0:41:18:FirstInvalid:Invalid metaclass 'int' used:UNDEFINED +invalid-metaclass:45:0:45:19:SecondInvalid:Invalid metaclass 'InvalidAsMetaclass' used:UNDEFINED +invalid-metaclass:49:0:49:18:ThirdInvalid:Invalid metaclass '2' used:UNDEFINED +invalid-metaclass:53:0:53:19:FourthInvalid:Invalid metaclass 'Instance of invalid_metaclass.InvalidAsMetaclass' used:UNDEFINED +invalid-metaclass:65:0:65:13:Invalid:Invalid metaclass 'int' used:UNDEFINED +invalid-metaclass:69:0:69:19:InvalidSecond:Invalid metaclass '1' used:UNDEFINED diff --git a/tests/functional/i/invalid/invalid_sequence_index.py b/tests/functional/i/invalid/invalid_sequence_index.py index 11108d4feb..56ade211b8 100644 --- a/tests/functional/i/invalid/invalid_sequence_index.py +++ b/tests/functional/i/invalid/invalid_sequence_index.py @@ -1,5 +1,9 @@ -"""Errors for invalid sequence indices""" # pylint: disable=too-few-public-methods, import-error, missing-docstring, unnecessary-pass + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + import six from unknown import Unknown diff --git a/tests/functional/i/invalid/invalid_sequence_index.txt b/tests/functional/i/invalid/invalid_sequence_index.txt index dc04046bee..81758b446d 100644 --- a/tests/functional/i/invalid/invalid_sequence_index.txt +++ b/tests/functional/i/invalid/invalid_sequence_index.txt @@ -1,19 +1,19 @@ -invalid-sequence-index:13:11:13:23:function1:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:17:11:17:25:function2:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:21:11:21:29:function3:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:25:11:25:24:function4:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:33:11:33:35:function5:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:37:11:37:26:function6:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:41:11:41:24:function7:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:48:11:48:28:function8:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:128:4:128:18:function19:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:133:8:133:22:function20:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:144:4:144:14:function21:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:145:8:145:18:function21:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:160:4:160:14:function22:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:162:8:162:18:function22:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:178:4:178:14:function23:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:180:4:180:14:function23:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:196:4:196:14:function24:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:198:8:198:18:function24:Sequence index is not an int, slice, or instance with __index__:UNDEFINED -invalid-sequence-index:208:11:208:27:function25:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:17:11:17:23:function1:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:21:11:21:25:function2:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:25:11:25:29:function3:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:29:11:29:24:function4:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:37:11:37:35:function5:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:41:11:41:26:function6:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:45:11:45:24:function7:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:52:11:52:28:function8:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:132:4:132:18:function19:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:137:8:137:22:function20:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:148:4:148:14:function21:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:149:8:149:18:function21:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:164:4:164:14:function22:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:166:8:166:18:function22:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:182:4:182:14:function23:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:184:4:184:14:function23:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:200:4:200:14:function24:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:202:8:202:18:function24:Sequence index is not an int, slice, or instance with __index__:UNDEFINED +invalid-sequence-index:212:11:212:27:function25:Sequence index is not an int, slice, or instance with __index__:UNDEFINED diff --git a/tests/functional/n/no/no_member_dataclasses.py b/tests/functional/n/no/no_member_dataclasses.py index 972da9ad91..97528e6984 100644 --- a/tests/functional/n/no/no_member_dataclasses.py +++ b/tests/functional/n/no/no_member_dataclasses.py @@ -1,6 +1,11 @@ -"""Test various regressions for dataclasses and no-member. -""" +"""Test various regressions for dataclasses and no-member.""" + # pylint: disable=missing-docstring, too-few-public-methods + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + from abc import ABCMeta, abstractmethod from dataclasses import asdict, dataclass, field from typing import Any, Dict diff --git a/tests/functional/n/no/no_member_dataclasses.txt b/tests/functional/n/no/no_member_dataclasses.txt index ee33c10fbf..bf91fc84f1 100644 --- a/tests/functional/n/no/no_member_dataclasses.txt +++ b/tests/functional/n/no/no_member_dataclasses.txt @@ -1,2 +1,2 @@ -no-member:69:26:69:46:TestClass2.some_func:Instance of 'Field' has no 'items' member:INFERENCE -no-member:81:26:81:46:TestClass3.some_func:Instance of 'Field' has no 'items' member:INFERENCE +no-member:74:26:74:46:TestClass2.some_func:Instance of 'Field' has no 'items' member:INFERENCE +no-member:86:26:86:46:TestClass3.some_func:Instance of 'Field' has no 'items' member:INFERENCE diff --git a/tests/functional/n/no/no_member_subclassed_dataclasses.py b/tests/functional/n/no/no_member_subclassed_dataclasses.py index 918abc5dbc..0dee108407 100644 --- a/tests/functional/n/no/no_member_subclassed_dataclasses.py +++ b/tests/functional/n/no/no_member_subclassed_dataclasses.py @@ -1,3 +1,10 @@ +# pylint: disable=fixme,logging-too-many-args,logging-fstring-interpolation,missing-docstring,no-else-return +# pylint: disable=too-few-public-methods + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + from abc import ABCMeta, abstractmethod import dataclasses as dc from typing import Any, Dict diff --git a/tests/functional/n/no/no_member_subclassed_dataclasses.rc b/tests/functional/n/no/no_member_subclassed_dataclasses.rc index d115e39866..a17bb22daf 100644 --- a/tests/functional/n/no/no_member_subclassed_dataclasses.rc +++ b/tests/functional/n/no/no_member_subclassed_dataclasses.rc @@ -1,10 +1,2 @@ [testoptions] min_pyver=3.7 - -[MESSAGES CONTROL] -disable=fixme, - logging-too-many-args, - logging-fstring-interpolation, - missing-docstring, - no-else-return, - too-few-public-methods, diff --git a/tests/functional/p/postponed_evaluation_pep585.py b/tests/functional/p/postponed_evaluation_pep585.py index 9537fccefd..1d539126d7 100644 --- a/tests/functional/p/postponed_evaluation_pep585.py +++ b/tests/functional/p/postponed_evaluation_pep585.py @@ -3,7 +3,15 @@ This check requires Python 3.7 or 3.8! Testing with 3.8 only, to support TypedDict. """ -# pylint: disable=missing-docstring,unused-argument,unused-import,too-few-public-methods,invalid-name,inherit-non-class,unsupported-binary-operation,wrong-import-position,ungrouped-imports,unused-variable,unnecessary-direct-lambda-call + +# pylint: disable=missing-docstring,unused-argument,unused-import,too-few-public-methods,invalid-name +# pylint: disable=inherit-non-class,unsupported-binary-operation,wrong-import-position,ungrouped-imports +# pylint: disable=unused-variable,unnecessary-direct-lambda-call + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + from __future__ import annotations import collections import dataclasses diff --git a/tests/functional/p/postponed_evaluation_pep585.txt b/tests/functional/p/postponed_evaluation_pep585.txt index 7e0d0d163c..899dc59774 100644 --- a/tests/functional/p/postponed_evaluation_pep585.txt +++ b/tests/functional/p/postponed_evaluation_pep585.txt @@ -1,19 +1,19 @@ -unsubscriptable-object:15:15:15:19::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:20:25:20:29:CustomIntListError:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:24:28:24:32::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:26:24:26:28::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:28:14:28:18::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:33:36:33:40::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:43:54:43:58::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:45:60:45:64::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:96:15:96:19::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:97:21:97:25::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:98:15:98:19::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:99:19:99:23::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:100:15:100:19::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:101:9:101:13::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:101:14:101:18::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:121:20:121:24:func3:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:123:33:123:37:func3:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:126:14:126:18:func4:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:129:32:129:35:func5:Value 'set' is unsubscriptable:UNDEFINED +unsubscriptable-object:23:15:23:19::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:28:25:28:29:CustomIntListError:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:32:28:32:32::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:34:24:34:28::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:36:14:36:18::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:41:36:41:40::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:51:54:51:58::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:53:60:53:64::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:104:15:104:19::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:105:21:105:25::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:106:15:106:19::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:107:19:107:23::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:108:15:108:19::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:109:9:109:13::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:109:14:109:18::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:129:20:129:24:func3:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:131:33:131:37:func3:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:134:14:134:18:func4:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:137:32:137:35:func5:Value 'set' is unsubscriptable:UNDEFINED diff --git a/tests/functional/p/postponed_evaluation_pep585_error.py b/tests/functional/p/postponed_evaluation_pep585_error.py index 7c117e33e4..19153105ea 100644 --- a/tests/functional/p/postponed_evaluation_pep585_error.py +++ b/tests/functional/p/postponed_evaluation_pep585_error.py @@ -3,7 +3,15 @@ This check requires Python 3.7 or Python 3.8! Testing with 3.8 only, to support TypedDict. """ -# pylint: disable=missing-docstring,unused-argument,unused-import,too-few-public-methods,invalid-name,inherit-non-class,unsupported-binary-operation,unused-variable,line-too-long,unnecessary-direct-lambda-call + +# pylint: disable=missing-docstring,unused-argument,unused-import,too-few-public-methods +# pylint: disable=invalid-name,inherit-non-class,unsupported-binary-operation +# pylint: disable=unused-variable,line-too-long,unnecessary-direct-lambda-call + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + import collections import dataclasses import typing diff --git a/tests/functional/p/postponed_evaluation_pep585_error.txt b/tests/functional/p/postponed_evaluation_pep585_error.txt index 4fe18301f4..406081dfae 100644 --- a/tests/functional/p/postponed_evaluation_pep585_error.txt +++ b/tests/functional/p/postponed_evaluation_pep585_error.txt @@ -1,49 +1,49 @@ -unsubscriptable-object:14:15:14:19::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:19:25:19:29:CustomIntListError:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:23:28:23:32::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:25:24:25:28::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:27:14:27:18::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:32:36:32:40::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:35:12:35:16:CustomNamedTuple2:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:38:12:38:16:CustomNamedTuple3:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:42:54:42:58::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:44:60:44:64::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:47:12:47:16:CustomTypedDict3:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:50:12:50:16:CustomTypedDict4:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:61:12:61:16:CustomDataClass:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:65:12:65:16:CustomDataClass2:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:69:12:69:16:CustomDataClass3:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:74:12:74:16:CustomDataClass4:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:77:6:77:9::Value 'set' is unsubscriptable:UNDEFINED -unsubscriptable-object:78:6:78:29::Value 'collections.OrderedDict' is unsubscriptable:UNDEFINED -unsubscriptable-object:79:6:79:10::Value 'dict' is unsubscriptable:UNDEFINED -unsubscriptable-object:79:16:79:20::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:80:16:80:20::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:81:6:81:10::Value 'dict' is unsubscriptable:UNDEFINED -unsubscriptable-object:81:11:81:16::Value 'tuple' is unsubscriptable:UNDEFINED -unsubscriptable-object:82:11:82:16::Value 'tuple' is unsubscriptable:UNDEFINED -unsubscriptable-object:83:6:83:10::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:83:11:83:15::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:84:12:84:16::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:84:6:84:11::Value 'tuple' is unsubscriptable:UNDEFINED -unsubscriptable-object:85:12:85:16::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:86:13:86:17::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:87:19:87:23::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:89:14:89:18:func:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:92:15:92:19:func2:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:95:15:95:19::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:96:21:96:25::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:97:19:97:23::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:98:15:98:19::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:99:9:99:13::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:99:14:99:18::Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:103:20:103:24:func3:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:105:33:105:37:func3:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:106:11:106:15:func3:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:108:14:108:18:func4:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:111:16:111:20:func5:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:111:32:111:35:func5:Value 'set' is unsubscriptable:UNDEFINED -unsubscriptable-object:114:75:114:79:func6:Value 'dict' is unsubscriptable:UNDEFINED -unsubscriptable-object:114:16:114:20:func6:Value 'list' is unsubscriptable:UNDEFINED -unsubscriptable-object:114:55:114:58:func6:Value 'set' is unsubscriptable:UNDEFINED -unsubscriptable-object:114:37:114:42:func6:Value 'tuple' is unsubscriptable:UNDEFINED +unsubscriptable-object:22:15:22:19::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:27:25:27:29:CustomIntListError:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:31:28:31:32::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:33:24:33:28::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:35:14:35:18::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:40:36:40:40::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:43:12:43:16:CustomNamedTuple2:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:46:12:46:16:CustomNamedTuple3:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:50:54:50:58::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:52:60:52:64::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:55:12:55:16:CustomTypedDict3:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:58:12:58:16:CustomTypedDict4:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:69:12:69:16:CustomDataClass:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:73:12:73:16:CustomDataClass2:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:77:12:77:16:CustomDataClass3:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:82:12:82:16:CustomDataClass4:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:85:6:85:9::Value 'set' is unsubscriptable:UNDEFINED +unsubscriptable-object:86:6:86:29::Value 'collections.OrderedDict' is unsubscriptable:UNDEFINED +unsubscriptable-object:87:6:87:10::Value 'dict' is unsubscriptable:UNDEFINED +unsubscriptable-object:87:16:87:20::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:88:16:88:20::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:89:6:89:10::Value 'dict' is unsubscriptable:UNDEFINED +unsubscriptable-object:89:11:89:16::Value 'tuple' is unsubscriptable:UNDEFINED +unsubscriptable-object:90:11:90:16::Value 'tuple' is unsubscriptable:UNDEFINED +unsubscriptable-object:91:6:91:10::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:91:11:91:15::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:92:12:92:16::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:92:6:92:11::Value 'tuple' is unsubscriptable:UNDEFINED +unsubscriptable-object:93:12:93:16::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:94:13:94:17::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:95:19:95:23::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:97:14:97:18:func:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:100:15:100:19:func2:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:103:15:103:19::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:104:21:104:25::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:105:19:105:23::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:106:15:106:19::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:107:9:107:13::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:107:14:107:18::Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:111:20:111:24:func3:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:113:33:113:37:func3:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:114:11:114:15:func3:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:116:14:116:18:func4:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:119:16:119:20:func5:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:119:32:119:35:func5:Value 'set' is unsubscriptable:UNDEFINED +unsubscriptable-object:122:75:122:79:func6:Value 'dict' is unsubscriptable:UNDEFINED +unsubscriptable-object:122:16:122:20:func6:Value 'list' is unsubscriptable:UNDEFINED +unsubscriptable-object:122:55:122:58:func6:Value 'set' is unsubscriptable:UNDEFINED +unsubscriptable-object:122:37:122:42:func6:Value 'tuple' is unsubscriptable:UNDEFINED diff --git a/tests/functional/r/redundant_unittest_assert.py b/tests/functional/r/redundant_unittest_assert.py index b7efffc4ee..aa41208312 100644 --- a/tests/functional/r/redundant_unittest_assert.py +++ b/tests/functional/r/redundant_unittest_assert.py @@ -1,13 +1,18 @@ -# pylint: disable=missing-docstring,too-few-public-methods """ -https://www.logilab.org/ticket/355 -If you are using assertTrue or assertFalse and the first argument is a -constant(like a string), then the assert will always be true. Therefore, -it should emit a warning message. +If you are using assertTrue or assertFalse and the first argument is a constant +(like a string), then the assert will always be true. Therefore, it should emit +a warning message. """ +# pylint: disable=missing-docstring,too-few-public-methods + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + import unittest + @unittest.skip("don't run this") class Tests(unittest.TestCase): def test_something(self): diff --git a/tests/functional/r/redundant_unittest_assert.txt b/tests/functional/r/redundant_unittest_assert.txt index 4c72539abd..44f9cb5206 100644 --- a/tests/functional/r/redundant_unittest_assert.txt +++ b/tests/functional/r/redundant_unittest_assert.txt @@ -1,6 +1,6 @@ -redundant-unittest-assert:17:8:17:71:Tests.test_something:Redundant use of assertTrue with constant value 'I meant assertEqual not assertTrue':UNDEFINED -redundant-unittest-assert:19:8:19:73:Tests.test_something:Redundant use of assertFalse with constant value 'I meant assertEqual not assertFalse':UNDEFINED -redundant-unittest-assert:21:8:21:39:Tests.test_something:Redundant use of assertTrue with constant value True:UNDEFINED -redundant-unittest-assert:23:8:23:41:Tests.test_something:Redundant use of assertFalse with constant value False:UNDEFINED -redundant-unittest-assert:25:8:25:40:Tests.test_something:Redundant use of assertFalse with constant value None:UNDEFINED -redundant-unittest-assert:27:8:27:36:Tests.test_something:Redundant use of assertTrue with constant value 0:UNDEFINED +redundant-unittest-assert:22:8:22:71:Tests.test_something:Redundant use of assertTrue with constant value 'I meant assertEqual not assertTrue':UNDEFINED +redundant-unittest-assert:24:8:24:73:Tests.test_something:Redundant use of assertFalse with constant value 'I meant assertEqual not assertFalse':UNDEFINED +redundant-unittest-assert:26:8:26:39:Tests.test_something:Redundant use of assertTrue with constant value True:UNDEFINED +redundant-unittest-assert:28:8:28:41:Tests.test_something:Redundant use of assertFalse with constant value False:UNDEFINED +redundant-unittest-assert:30:8:30:40:Tests.test_something:Redundant use of assertFalse with constant value None:UNDEFINED +redundant-unittest-assert:32:8:32:36:Tests.test_something:Redundant use of assertTrue with constant value 0:UNDEFINED diff --git a/tests/functional/r/regression/regression_4439.py b/tests/functional/r/regression/regression_4439.py index 966cc80067..257a20a866 100644 --- a/tests/functional/r/regression/regression_4439.py +++ b/tests/functional/r/regression/regression_4439.py @@ -1,6 +1,10 @@ """AttributeError: 'Subscript' object has no attribute 'name' """ # pylint: disable=missing-docstring +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + from typing import Optional from attr import attrib, attrs @@ -10,4 +14,4 @@ class User: name: str = attrib() age: int = attrib() - occupation = Optional[str] = attrib(default=None) # [unsupported-assignment-operation] + occupation = Optional[str] = attrib(default=None) # [unsupported-assignment-operation] diff --git a/tests/functional/r/regression/regression_4439.txt b/tests/functional/r/regression/regression_4439.txt index 4e280a1afd..6db65057f7 100644 --- a/tests/functional/r/regression/regression_4439.txt +++ b/tests/functional/r/regression/regression_4439.txt @@ -1 +1 @@ -unsupported-assignment-operation:13:17:13:25:User:'Optional' does not support item assignment:UNDEFINED +unsupported-assignment-operation:17:17:17:25:User:'Optional' does not support item assignment:UNDEFINED diff --git a/tests/functional/s/subclassed_final_class_py38.py b/tests/functional/s/subclassed_final_class_py38.py index 60e9a76256..a4621d5324 100644 --- a/tests/functional/s/subclassed_final_class_py38.py +++ b/tests/functional/s/subclassed_final_class_py38.py @@ -1,8 +1,12 @@ """Since Python version 3.8, a class decorated with typing.final cannot be -subclassed """ +subclassed.""" # pylint: disable=missing-docstring, too-few-public-methods +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + from typing import final @@ -11,5 +15,5 @@ class Base: pass -class Subclass(Base): # [subclassed-final-class] +class Subclass(Base): # [subclassed-final-class] pass diff --git a/tests/functional/s/subclassed_final_class_py38.txt b/tests/functional/s/subclassed_final_class_py38.txt index 9dec8110e8..4b73d2d986 100644 --- a/tests/functional/s/subclassed_final_class_py38.txt +++ b/tests/functional/s/subclassed_final_class_py38.txt @@ -1 +1 @@ -subclassed-final-class:14:0:14:14:Subclass:"Class 'Subclass' is a subclass of a class decorated with typing.final: 'Base'":UNDEFINED +subclassed-final-class:18:0:18:14:Subclass:"Class 'Subclass' is a subclass of a class decorated with typing.final: 'Base'":UNDEFINED diff --git a/tests/functional/t/too/too_few_public_methods_37.py b/tests/functional/t/too/too_few_public_methods_37.py index 55fc544840..3b63a8fecf 100644 --- a/tests/functional/t/too/too_few_public_methods_37.py +++ b/tests/functional/t/too/too_few_public_methods_37.py @@ -1,4 +1,9 @@ # pylint: disable=missing-docstring + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + import dataclasses import typing from dataclasses import dataclass diff --git a/tests/functional/t/too/too_many_instance_attributes.py b/tests/functional/t/too/too_many_instance_attributes.py index 73cbd736ba..3177dc8aa8 100644 --- a/tests/functional/t/too/too_many_instance_attributes.py +++ b/tests/functional/t/too/too_many_instance_attributes.py @@ -1,5 +1,9 @@ # pylint: disable=missing-docstring, too-few-public-methods +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + class Aaaa: # [too-many-instance-attributes] diff --git a/tests/functional/t/too/too_many_instance_attributes.txt b/tests/functional/t/too/too_many_instance_attributes.txt index d3f1282228..4c67ec5a30 100644 --- a/tests/functional/t/too/too_many_instance_attributes.txt +++ b/tests/functional/t/too/too_many_instance_attributes.txt @@ -1 +1 @@ -too-many-instance-attributes:4:0:4:10:Aaaa:Too many instance attributes (21/7):UNDEFINED +too-many-instance-attributes:8:0:8:10:Aaaa:Too many instance attributes (21/7):UNDEFINED diff --git a/tests/functional/t/too/too_many_instance_attributes_py37.py b/tests/functional/t/too/too_many_instance_attributes_py37.py index 68e101892a..152bb1ca22 100644 --- a/tests/functional/t/too/too_many_instance_attributes_py37.py +++ b/tests/functional/t/too/too_many_instance_attributes_py37.py @@ -1,8 +1,17 @@ +""" +InitVars should not count as instance attributes (see issue #3754) +Default max_instance_attributes is 7 +""" + # pylint: disable=missing-docstring, too-few-public-methods + +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + from dataclasses import dataclass, InitVar -# InitVars should not count as instance attributes (see issue #3754) -# Default max_instance_attributes is 7 + @dataclass class Hello: a_1: int diff --git a/tests/functional/u/unpacking/unpacking_non_sequence_py37.py b/tests/functional/u/unpacking/unpacking_non_sequence_py37.py index dd8af1136c..13ab35b9a9 100644 --- a/tests/functional/u/unpacking/unpacking_non_sequence_py37.py +++ b/tests/functional/u/unpacking/unpacking_non_sequence_py37.py @@ -1,6 +1,13 @@ +""" +https://github.com/PyCQA/pylint/issues/4895 +""" + # pylint: disable=missing-docstring -# https://github.com/PyCQA/pylint/issues/4895 +# Disabled because of a bug with pypy 3.8 see +# https://github.com/PyCQA/pylint/pull/7918#issuecomment-1352737369 +# pylint: disable=multiple-statements + from __future__ import annotations from collections.abc import Callable