summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-03-17 20:32:32 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-03-28 22:45:45 +0200
commitcc8aecde635f991b1bb8e1331ce2e213ebaf695a (patch)
tree4a0f6aec7f55f01a59b72b482e6097471c3a924e
parent32c5b9f2e73085e5a7b368c57b0568569581052e (diff)
downloadpylint-git-cc8aecde635f991b1bb8e1331ce2e213ebaf695a.tar.gz
Enable use-symbolic-message-instead in functional tests
-rw-r--r--pylint/testutils/lint_module_test.py1
-rw-r--r--tests/functional/a/access/access_attr_before_def_false_positive.py9
-rw-r--r--tests/functional/a/access/access_to_protected_members.py4
-rw-r--r--tests/functional/a/alternative_union_syntax.py4
-rw-r--r--tests/functional/a/anomalous_backslash_escape.py2
-rw-r--r--tests/functional/a/anomalous_unicode_escape_py3.py2
-rw-r--r--tests/functional/b/base_init_vars.py6
-rw-r--r--tests/functional/b/base_init_vars.txt1
-rw-r--r--tests/functional/c/class_members_py30.py2
-rw-r--r--tests/functional/c/class_scope.py2
-rw-r--r--tests/functional/c/classes_meth_could_be_a_function.py4
-rw-r--r--tests/functional/c/classes_meth_could_be_a_function.txt1
-rw-r--r--tests/functional/c/ctor_arguments.py2
-rw-r--r--tests/functional/d/decorator_scope.py2
-rw-r--r--tests/functional/d/decorator_scope.txt1
-rw-r--r--tests/functional/d/docstrings.py2
-rw-r--r--tests/functional/d/dotted_ancestor.py2
-rw-r--r--tests/functional/d/duplicate_dict_literal_key.py2
-rw-r--r--tests/functional/e/e1101_9588_base_attr_aug_assign.py2
-rw-r--r--tests/functional/e/external_classmethod_crash.py2
-rw-r--r--tests/functional/e/external_classmethod_crash.txt2
-rw-r--r--tests/functional/f/first_arg.py2
-rw-r--r--tests/functional/f/first_arg.txt1
-rw-r--r--tests/functional/f/function_redefined.py4
-rw-r--r--tests/functional/g/genexp_in_class_scope.py4
-rw-r--r--tests/functional/g/genexp_in_class_scope.txt1
-rw-r--r--tests/functional/i/init_not_called.py2
-rw-r--r--tests/functional/i/init_return_from_inner_function.py2
-rw-r--r--tests/functional/i/init_return_from_inner_function.txt1
-rw-r--r--tests/functional/i/inner_classes.py2
-rw-r--r--tests/functional/l/logging_format_interpolation.py4
-rw-r--r--tests/functional/l/logging_format_interpolation.txt1
-rw-r--r--tests/functional/m/messages_managed_by_id.py2
-rw-r--r--tests/functional/m/messages_managed_by_id.txt1
-rw-r--r--tests/functional/m/metaclass_attr_access.py2
-rw-r--r--tests/functional/n/nan_comparison_check.py4
-rw-r--r--tests/functional/n/nested_func_defined_in_loop.py3
-rw-r--r--tests/functional/n/nested_func_defined_in_loop.txt1
-rw-r--r--tests/functional/n/no/no_name_in_module.py6
-rw-r--r--tests/functional/n/no/no_self_use.py2
-rw-r--r--tests/functional/n/non/__init__.py0
-rw-r--r--tests/functional/n/non/non_ascii_name.py (renamed from tests/functional/n/non_ascii_name.py)0
-rw-r--r--tests/functional/n/non/non_ascii_name.rc (renamed from tests/functional/n/non_ascii_name.rc)0
-rw-r--r--tests/functional/n/non/non_ascii_name.txt (renamed from tests/functional/n/non_ascii_name.txt)0
-rw-r--r--tests/functional/n/non/non_init_parent_called.py (renamed from tests/functional/n/non_init_parent_called.py)4
-rw-r--r--tests/functional/n/non/non_init_parent_called.txt8
-rw-r--r--tests/functional/n/non/non_iterator_returned.py (renamed from tests/functional/n/non_iterator_returned.py)0
-rw-r--r--tests/functional/n/non/non_iterator_returned.txt (renamed from tests/functional/n/non_iterator_returned.txt)0
-rw-r--r--tests/functional/n/non/non_str_assignment_to_dunder_name.py (renamed from tests/functional/n/non_str_assignment_to_dunder_name.py)0
-rw-r--r--tests/functional/n/non/non_str_assignment_to_dunder_name.txt (renamed from tests/functional/n/non_str_assignment_to_dunder_name.txt)0
-rw-r--r--tests/functional/n/non_init_parent_called.txt6
-rw-r--r--tests/functional/o/object_as_class_attribute.py2
-rw-r--r--tests/functional/o/overloaded_operator.py2
-rw-r--r--tests/functional/p/pragma_after_backslash.py2
-rw-r--r--tests/functional/p/property_affectation_py26.py2
-rw-r--r--tests/functional/s/string/string_log_formatting.py2
-rw-r--r--tests/functional/u/unsubscriptable_value_py37.py8
-rw-r--r--tests/functional/u/unsubscriptable_value_py37.txt2
-rw-r--r--tests/functional/u/unused/unused_argument.py4
59 files changed, 75 insertions, 67 deletions
diff --git a/pylint/testutils/lint_module_test.py b/pylint/testutils/lint_module_test.py
index 3f8db2023..786e1bec5 100644
--- a/pylint/testutils/lint_module_test.py
+++ b/pylint/testutils/lint_module_test.py
@@ -35,7 +35,6 @@ class LintModuleTest:
self._linter.disable("suppressed-message")
self._linter.disable("locally-disabled")
self._linter.disable("useless-suppression")
- self._linter.disable("use-symbolic-message-instead")
try:
self._linter.read_config_file(test_file.option_file)
self._linter.load_config_file()
diff --git a/tests/functional/a/access/access_attr_before_def_false_positive.py b/tests/functional/a/access/access_attr_before_def_false_positive.py
index 3884c9980..00b7e40ed 100644
--- a/tests/functional/a/access/access_attr_before_def_false_positive.py
+++ b/tests/functional/a/access/access_attr_before_def_false_positive.py
@@ -1,10 +1,9 @@
-#pylint: disable=C0103,R0904,R0903,W0201,no-absolute-import, useless-object-inheritance
-"""
-This module demonstrates a possible problem of pyLint with calling __init__ s
+# pylint: disable=invalid-name,too-many-public-methods,attribute-defined-outside-init
+# pylint: disable=no-absolute-import, useless-object-inheritance,too-few-public-methods
+"""This module demonstrates a possible problem of pyLint with calling __init__ s
from inherited classes.
Initializations done there are not considered, which results in Error E0203 for
-self.cookedq.
-"""
+self.cookedq."""
from __future__ import print_function
diff --git a/tests/functional/a/access/access_to_protected_members.py b/tests/functional/a/access/access_to_protected_members.py
index 737d8b9d6..777cd5ccd 100644
--- a/tests/functional/a/access/access_to_protected_members.py
+++ b/tests/functional/a/access/access_to_protected_members.py
@@ -1,5 +1,5 @@
-# pylint: disable=too-few-public-methods, W0231, print-statement, useless-object-inheritance
-# pylint: disable=no-classmethod-decorator
+# pylint: disable=too-few-public-methods, super-init-not-called, print-statement
+# pylint: disable=no-classmethod-decorator,useless-object-inheritance
"""Test external access to protected class members."""
from __future__ import print_function
diff --git a/tests/functional/a/alternative_union_syntax.py b/tests/functional/a/alternative_union_syntax.py
index cb5995efa..9e258faa5 100644
--- a/tests/functional/a/alternative_union_syntax.py
+++ b/tests/functional/a/alternative_union_syntax.py
@@ -1,11 +1,11 @@
"""Test PEP 604 - Alternative Union syntax"""
-# pylint: disable=missing-function-docstring,unused-argument,invalid-name,missing-class-docstring,inherit-non-class,too-few-public-methods
+# pylint: disable=missing-function-docstring,unused-argument,invalid-name,missing-class-docstring
+# pylint: disable=inherit-non-class,too-few-public-methods
import dataclasses
import typing
from dataclasses import dataclass
from typing import NamedTuple, TypedDict
-
Alias = str | list[int]
lst = [typing.Dict[str, int] | None,]
diff --git a/tests/functional/a/anomalous_backslash_escape.py b/tests/functional/a/anomalous_backslash_escape.py
index 4921c6f8a..f753dfd92 100644
--- a/tests/functional/a/anomalous_backslash_escape.py
+++ b/tests/functional/a/anomalous_backslash_escape.py
@@ -1,6 +1,6 @@
-# pylint:disable=W0105, W0511
"""Test for anomalous backslash escapes in strings"""
+
BAD_ESCAPE = '\z' # [anomalous-backslash-in-string]
BAD_ESCAPE_NOT_FIRST = 'abc\z' # [anomalous-backslash-in-string]
BAD_ESCAPE_WITH_PREFIX = b'abc\z' # [anomalous-backslash-in-string]
diff --git a/tests/functional/a/anomalous_unicode_escape_py3.py b/tests/functional/a/anomalous_unicode_escape_py3.py
index b8bfd0a96..18ebdf5f6 100644
--- a/tests/functional/a/anomalous_unicode_escape_py3.py
+++ b/tests/functional/a/anomalous_unicode_escape_py3.py
@@ -1,4 +1,4 @@
-# pylint:disable=W0105, W0511
+# pylint:disable=pointless-string-statement
"""Test for backslash escapes in byte vs unicode strings"""
# Would be valid in Unicode, but probably not what you want otherwise
diff --git a/tests/functional/b/base_init_vars.py b/tests/functional/b/base_init_vars.py
index 152cbfd47..08e2828ec 100644
--- a/tests/functional/b/base_init_vars.py
+++ b/tests/functional/b/base_init_vars.py
@@ -1,6 +1,6 @@
-# pylint:disable=R0201, print-statement, too-few-public-methods, useless-object-inheritance
-"""Checks that class variables are seen as inherited !
-"""
+# pylint:disable=no-self-use, print-statement
+# pylint:disable=too-few-public-methods, useless-object-inheritance
+"""Checks that class variables are seen as inherited !"""
__revision__ = ''
class BaseClass(object):
diff --git a/tests/functional/b/base_init_vars.txt b/tests/functional/b/base_init_vars.txt
new file mode 100644
index 000000000..75c59d324
--- /dev/null
+++ b/tests/functional/b/base_init_vars.txt
@@ -0,0 +1 @@
+use-symbolic-message-instead:1:0::Id 'no-self-use' is used to disable 'no-self-use' message emission
diff --git a/tests/functional/c/class_members_py30.py b/tests/functional/c/class_members_py30.py
index 49eb93a2a..cb7267ce5 100644
--- a/tests/functional/c/class_members_py30.py
+++ b/tests/functional/c/class_members_py30.py
@@ -1,5 +1,5 @@
""" Various tests for class members access. """
-# pylint: disable=R0903,import-error,no-init,missing-docstring, wrong-import-position,wrong-import-order, useless-object-inheritance
+# pylint: disable=too-few-public-methods,import-error,no-init,missing-docstring, wrong-import-position,wrong-import-order, useless-object-inheritance
from missing import Missing
class MyClass(object):
"""class docstring"""
diff --git a/tests/functional/c/class_scope.py b/tests/functional/c/class_scope.py
index 4e1561c9a..a22ba721b 100644
--- a/tests/functional/c/class_scope.py
+++ b/tests/functional/c/class_scope.py
@@ -1,4 +1,4 @@
-# pylint: disable=R0903,W0232, useless-object-inheritance
+# pylint: disable=too-few-public-methods,no-init, useless-object-inheritance
"""check for scope problems"""
__revision__ = None
diff --git a/tests/functional/c/classes_meth_could_be_a_function.py b/tests/functional/c/classes_meth_could_be_a_function.py
index 05a6c40d7..b9b7cdeb4 100644
--- a/tests/functional/c/classes_meth_could_be_a_function.py
+++ b/tests/functional/c/classes_meth_could_be_a_function.py
@@ -1,4 +1,4 @@
-# pylint: disable=C0111,R0903,W0232, useless-object-inheritance
+# pylint: disable=C0111,too-few-public-methods,W0232, useless-object-inheritance # [use-symbolic-message-instead]
"""
#2479
@@ -18,7 +18,7 @@ class Aimpl(object):
# disable "method could be a function" on classes which are not overriding
# the factory method because in that case the usage of polymorphism is not
# detected
- # pylint: disable=R0201
+ # pylint: disable=no-self-use
def makex(self):
return XAsub()
diff --git a/tests/functional/c/classes_meth_could_be_a_function.txt b/tests/functional/c/classes_meth_could_be_a_function.txt
new file mode 100644
index 000000000..3f9a0950b
--- /dev/null
+++ b/tests/functional/c/classes_meth_could_be_a_function.txt
@@ -0,0 +1 @@
+use-symbolic-message-instead:1:0::Id 'W0232' is used to disable 'no-init' message emission
diff --git a/tests/functional/c/ctor_arguments.py b/tests/functional/c/ctor_arguments.py
index 12bf8690a..ee05126b1 100644
--- a/tests/functional/c/ctor_arguments.py
+++ b/tests/functional/c/ctor_arguments.py
@@ -2,7 +2,7 @@
Based on tests/functional/a/arguments.py
"""
-# pylint: disable=C0111,R0903,W0231, useless-object-inheritance
+# pylint: disable=C0111,too-few-public-methods,super-init-not-called, useless-object-inheritance
class Class1Arg(object):
diff --git a/tests/functional/d/decorator_scope.py b/tests/functional/d/decorator_scope.py
index 8d35159e9..222e3cc46 100644
--- a/tests/functional/d/decorator_scope.py
+++ b/tests/functional/d/decorator_scope.py
@@ -1,4 +1,4 @@
-# -*- pylint: disable=W0232,R0903, useless-object-inheritance
+# -*- pylint: disable=W0232,too-few-public-methods, useless-object-inheritance # [use-symbolic-message-instead]
"""Test that decorators sees the class namespace - just like
function default values does but function body doesn't.
diff --git a/tests/functional/d/decorator_scope.txt b/tests/functional/d/decorator_scope.txt
new file mode 100644
index 000000000..3f9a0950b
--- /dev/null
+++ b/tests/functional/d/decorator_scope.txt
@@ -0,0 +1 @@
+use-symbolic-message-instead:1:0::Id 'W0232' is used to disable 'no-init' message emission
diff --git a/tests/functional/d/docstrings.py b/tests/functional/d/docstrings.py
index a11350111..e466a000f 100644
--- a/tests/functional/d/docstrings.py
+++ b/tests/functional/d/docstrings.py
@@ -1,4 +1,4 @@
-# pylint: disable=R0201, useless-object-inheritance, unnecessary-pass
+# pylint: disable=no-self-use, useless-object-inheritance, unnecessary-pass
# -1: [missing-module-docstring]
from __future__ import print_function
diff --git a/tests/functional/d/dotted_ancestor.py b/tests/functional/d/dotted_ancestor.py
index 89ca2fac9..2c82d89a3 100644
--- a/tests/functional/d/dotted_ancestor.py
+++ b/tests/functional/d/dotted_ancestor.py
@@ -1,7 +1,7 @@
"""bla"""
# pylint: disable=no-absolute-import
-from ..n import non_init_parent_called
+from ..n.non import non_init_parent_called
__revision__ = 'yo'
diff --git a/tests/functional/d/duplicate_dict_literal_key.py b/tests/functional/d/duplicate_dict_literal_key.py
index 726a2591e..67eab280f 100644
--- a/tests/functional/d/duplicate_dict_literal_key.py
+++ b/tests/functional/d/duplicate_dict_literal_key.py
@@ -1,5 +1,5 @@
"""Check multiple key definition"""
-# pylint: disable=C0103,pointless-statement
+# pylint: disable=pointless-statement
correct_dict = {
'tea': 'for two',
diff --git a/tests/functional/e/e1101_9588_base_attr_aug_assign.py b/tests/functional/e/e1101_9588_base_attr_aug_assign.py
index 11472010c..7306840cb 100644
--- a/tests/functional/e/e1101_9588_base_attr_aug_assign.py
+++ b/tests/functional/e/e1101_9588_base_attr_aug_assign.py
@@ -1,4 +1,4 @@
-# pylint: disable=R0903, useless-object-inheritance
+# pylint: disable=too-few-public-methods, useless-object-inheritance
"""
False positive case of E1101:
diff --git a/tests/functional/e/external_classmethod_crash.py b/tests/functional/e/external_classmethod_crash.py
index e9842a5e5..fd225a17b 100644
--- a/tests/functional/e/external_classmethod_crash.py
+++ b/tests/functional/e/external_classmethod_crash.py
@@ -1,4 +1,4 @@
-# pylint: disable=W0232,R0903,W0613, useless-object-inheritance
+# pylint: disable=W0232,too-few-public-methods,W0613, useless-object-inheritance # [use-symbolic-message-instead,use-symbolic-message-instead]
"""tagging a function as a class method cause a crash when checking for
signature overriding
"""
diff --git a/tests/functional/e/external_classmethod_crash.txt b/tests/functional/e/external_classmethod_crash.txt
new file mode 100644
index 000000000..780ef6e6c
--- /dev/null
+++ b/tests/functional/e/external_classmethod_crash.txt
@@ -0,0 +1,2 @@
+use-symbolic-message-instead:1:0::Id 'W0232' is used to disable 'no-init' message emission
+use-symbolic-message-instead:1:0::Id 'W0613' is used to disable 'unused-argument' message emission
diff --git a/tests/functional/f/first_arg.py b/tests/functional/f/first_arg.py
index 4391bc88b..2a818ccfc 100644
--- a/tests/functional/f/first_arg.py
+++ b/tests/functional/f/first_arg.py
@@ -1,4 +1,4 @@
-# pylint: disable=C0111, W0232, useless-object-inheritance
+# pylint: disable=missing-docstring, W0232, useless-object-inheritance # [use-symbolic-message-instead]
"""check for methods first arguments
"""
diff --git a/tests/functional/f/first_arg.txt b/tests/functional/f/first_arg.txt
index 8344fa8dd..f9a0b63d3 100644
--- a/tests/functional/f/first_arg.txt
+++ b/tests/functional/f/first_arg.txt
@@ -1,3 +1,4 @@
+use-symbolic-message-instead:1:0::Id 'W0232' is used to disable 'no-init' message emission
bad-classmethod-argument:10:4:Obj.__new__:Class method __new__ should have 'cls' as first argument
no-classmethod-decorator:16:4:Obj:Consider using a decorator instead of calling classmethod
bad-classmethod-argument:18:4:Obj.class2:Class method class2 should have 'cls' as first argument
diff --git a/tests/functional/f/function_redefined.py b/tests/functional/f/function_redefined.py
index 554b68fc9..daac81dd6 100644
--- a/tests/functional/f/function_redefined.py
+++ b/tests/functional/f/function_redefined.py
@@ -1,7 +1,7 @@
-# pylint: disable=R0201,missing-docstring,using-constant-test,unused-import,wrong-import-position,reimported, useless-object-inheritance, unnecessary-pass
+# pylint: disable=no-self-use,missing-docstring,using-constant-test, useless-object-inheritance
+# pylint: disable=unused-import,wrong-import-position,reimported, unnecessary-pass
from __future__ import division
__revision__ = ''
-
class AAAA(object):
"""docstring"""
def __init__(self):
diff --git a/tests/functional/g/genexp_in_class_scope.py b/tests/functional/g/genexp_in_class_scope.py
index 868cf6b79..175f07c53 100644
--- a/tests/functional/g/genexp_in_class_scope.py
+++ b/tests/functional/g/genexp_in_class_scope.py
@@ -1,6 +1,6 @@
-# pylint: disable=W0232,R0903, missing-docstring, useless-object-inheritance
+# pylint: disable=W0232,too-few-public-methods, missing-docstring # [use-symbolic-message-instead]
+# pylint: disable=useless-object-inheritance
"""Class scope must be handled correctly in genexps"""
-
class MyClass(object):
var1 = []
var2 = list(value*2 for value in var1)
diff --git a/tests/functional/g/genexp_in_class_scope.txt b/tests/functional/g/genexp_in_class_scope.txt
new file mode 100644
index 000000000..3f9a0950b
--- /dev/null
+++ b/tests/functional/g/genexp_in_class_scope.txt
@@ -0,0 +1 @@
+use-symbolic-message-instead:1:0::Id 'W0232' is used to disable 'no-init' message emission
diff --git a/tests/functional/i/init_not_called.py b/tests/functional/i/init_not_called.py
index 9c9d24dae..8f646eb26 100644
--- a/tests/functional/i/init_not_called.py
+++ b/tests/functional/i/init_not_called.py
@@ -1,4 +1,4 @@
-# pylint: disable=R0903,import-error,missing-docstring,wrong-import-position,useless-super-delegation, useless-object-inheritance, unnecessary-pass
+# pylint: disable=too-few-public-methods,import-error,missing-docstring,wrong-import-position,useless-super-delegation, useless-object-inheritance, unnecessary-pass
"""test for __init__ not called
"""
from __future__ import print_function
diff --git a/tests/functional/i/init_return_from_inner_function.py b/tests/functional/i/init_return_from_inner_function.py
index 769d5ac96..065a1ad70 100644
--- a/tests/functional/i/init_return_from_inner_function.py
+++ b/tests/functional/i/init_return_from_inner_function.py
@@ -1,4 +1,4 @@
-# pylint: disable=R0903, useless-object-inheritance
+# pylint: disable=too-few-public-methods, useless-object-inheritance
"""#10075"""
__revision__ = 1
diff --git a/tests/functional/i/init_return_from_inner_function.txt b/tests/functional/i/init_return_from_inner_function.txt
new file mode 100644
index 000000000..448bcc4fb
--- /dev/null
+++ b/tests/functional/i/init_return_from_inner_function.txt
@@ -0,0 +1 @@
+use-symbolic-message-instead:1:0::Id 'too-few-public-methods' is used to disable 'too-few-public-methods' message emission
diff --git a/tests/functional/i/inner_classes.py b/tests/functional/i/inner_classes.py
index 24a2edb80..7ce8101f0 100644
--- a/tests/functional/i/inner_classes.py
+++ b/tests/functional/i/inner_classes.py
@@ -1,4 +1,4 @@
-# pylint: disable=R0903, useless-object-inheritance, unnecessary-pass
+# pylint: disable=too-few-public-methods, useless-object-inheritance, unnecessary-pass
"""Backend Base Classes for the schwelm user DB"""
__revision__ = "alpha"
diff --git a/tests/functional/l/logging_format_interpolation.py b/tests/functional/l/logging_format_interpolation.py
index 5f61d6baf..b546ae835 100644
--- a/tests/functional/l/logging_format_interpolation.py
+++ b/tests/functional/l/logging_format_interpolation.py
@@ -1,5 +1,5 @@
-# pylint: disable=E1101, no-absolute-import, import-error,line-too-long, missing-docstring,wrong-import-order,wrong-import-position
-# pylint: disable=invalid-name
+# pylint: disable=E1101, no-absolute-import, import-error,line-too-long # [use-symbolic-message-instead]
+# pylint: disable=invalid-name,missing-docstring,wrong-import-order,wrong-import-position
try:
import __builtin__ as builtins
except ImportError:
diff --git a/tests/functional/l/logging_format_interpolation.txt b/tests/functional/l/logging_format_interpolation.txt
index 6469d204c..2364e1617 100644
--- a/tests/functional/l/logging_format_interpolation.txt
+++ b/tests/functional/l/logging_format_interpolation.txt
@@ -1,3 +1,4 @@
+use-symbolic-message-instead:1:0::Id 'E1101' is used to disable 'no-member' message emission
logging-format-interpolation:16:22::Use lazy % formatting in logging functions
logging-format-interpolation:17:43::Use lazy % formatting in logging functions
logging-format-interpolation:18:22::Use lazy % formatting in logging functions
diff --git a/tests/functional/m/messages_managed_by_id.py b/tests/functional/m/messages_managed_by_id.py
index 67b74ec88..12e4bf58e 100644
--- a/tests/functional/m/messages_managed_by_id.py
+++ b/tests/functional/m/messages_managed_by_id.py
@@ -3,7 +3,7 @@
def foo(): #pylint: disable=C0102
return 1
-def toto(): #pylint: disable=C0102,R1711
+def toto(): #pylint: disable=C0102,R1711 # [use-symbolic-message-instead]
return
# +1: [missing-function-docstring]
diff --git a/tests/functional/m/messages_managed_by_id.txt b/tests/functional/m/messages_managed_by_id.txt
index 6e70883cb..4b93742b0 100644
--- a/tests/functional/m/messages_managed_by_id.txt
+++ b/tests/functional/m/messages_managed_by_id.txt
@@ -1 +1,2 @@
+use-symbolic-message-instead:6:0::Id 'R1711' is used to disable 'useless-return' message emission
missing-function-docstring:10:0:test_enabled_by_id_msg:Missing function or method docstring
diff --git a/tests/functional/m/metaclass_attr_access.py b/tests/functional/m/metaclass_attr_access.py
index 149e07812..e6bf1cccb 100644
--- a/tests/functional/m/metaclass_attr_access.py
+++ b/tests/functional/m/metaclass_attr_access.py
@@ -1,4 +1,4 @@
-# pylint: disable=R0903, metaclass-assignment, useless-object-inheritance
+# pylint: disable=too-few-public-methods, metaclass-assignment, useless-object-inheritance
"""test attribute access on metaclass"""
diff --git a/tests/functional/n/nan_comparison_check.py b/tests/functional/n/nan_comparison_check.py
index db539a11e..b01cf2636 100644
--- a/tests/functional/n/nan_comparison_check.py
+++ b/tests/functional/n/nan_comparison_check.py
@@ -1,6 +1,6 @@
-# pylint: disable=missing-docstring, invalid-name, misplaced-comparison-constant,literal-comparison,comparison-with-itself, import-error
+# pylint: disable=missing-docstring, invalid-name, misplaced-comparison-constant
+# pylint: disable=literal-comparison,comparison-with-itself, import-error
"""Test detection of NaN value comparison."""
-
import numpy
x = 42
a = x is numpy.NaN # [nan-comparison]
diff --git a/tests/functional/n/nested_func_defined_in_loop.py b/tests/functional/n/nested_func_defined_in_loop.py
index af3479074..39d2889a4 100644
--- a/tests/functional/n/nested_func_defined_in_loop.py
+++ b/tests/functional/n/nested_func_defined_in_loop.py
@@ -1,11 +1,10 @@
-# pylint: disable=W0640
"""Check a nested function defined in a loop."""
def example(args):
"""The check"""
for i in args:
def nested():
- print(i)
+ print(i) # [cell-var-from-loop]
nested()
for i in args:
print(i)
diff --git a/tests/functional/n/nested_func_defined_in_loop.txt b/tests/functional/n/nested_func_defined_in_loop.txt
new file mode 100644
index 000000000..9f70ebc4c
--- /dev/null
+++ b/tests/functional/n/nested_func_defined_in_loop.txt
@@ -0,0 +1 @@
+cell-var-from-loop:7:18:example.nested:Cell variable i defined in loop
diff --git a/tests/functional/n/no/no_name_in_module.py b/tests/functional/n/no/no_name_in_module.py
index 73ad2db93..e3ea9469b 100644
--- a/tests/functional/n/no/no_name_in_module.py
+++ b/tests/functional/n/no/no_name_in_module.py
@@ -1,7 +1,7 @@
-#pylint: disable=W0401,W0611,no-absolute-import,invalid-name,import-error,bare-except,broad-except,wrong-import-order,ungrouped-imports,wrong-import-position
-"""check unexistant names imported are reported"""
+# pylint: disable=wildcard-import,unused-import,no-absolute-import,invalid-name,import-error,
+# pylint: disable=bare-except,broad-except,wrong-import-order,ungrouped-imports,wrong-import-position
+"""check nonexistent names imported are reported"""
from __future__ import print_function
-
import collections.tutu # [no-name-in-module]
from collections import toto # [no-name-in-module]
toto.yo()
diff --git a/tests/functional/n/no/no_self_use.py b/tests/functional/n/no/no_self_use.py
index 3d3cda1f2..a28243df8 100644
--- a/tests/functional/n/no/no_self_use.py
+++ b/tests/functional/n/no/no_self_use.py
@@ -1,4 +1,4 @@
-# pylint: disable=R0903,W0232,missing-docstring, useless-object-inheritance
+# pylint: disable=too-few-public-methods,missing-docstring, useless-object-inheritance
"""test detection of method which could be a function"""
from __future__ import print_function
diff --git a/tests/functional/n/non/__init__.py b/tests/functional/n/non/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/functional/n/non/__init__.py
diff --git a/tests/functional/n/non_ascii_name.py b/tests/functional/n/non/non_ascii_name.py
index 276a23f75..276a23f75 100644
--- a/tests/functional/n/non_ascii_name.py
+++ b/tests/functional/n/non/non_ascii_name.py
diff --git a/tests/functional/n/non_ascii_name.rc b/tests/functional/n/non/non_ascii_name.rc
index ff09ea1f6..ff09ea1f6 100644
--- a/tests/functional/n/non_ascii_name.rc
+++ b/tests/functional/n/non/non_ascii_name.rc
diff --git a/tests/functional/n/non_ascii_name.txt b/tests/functional/n/non/non_ascii_name.txt
index 076d7267d..076d7267d 100644
--- a/tests/functional/n/non_ascii_name.txt
+++ b/tests/functional/n/non/non_ascii_name.txt
diff --git a/tests/functional/n/non_init_parent_called.py b/tests/functional/n/non/non_init_parent_called.py
index fd196f666..d330ac11e 100644
--- a/tests/functional/n/non_init_parent_called.py
+++ b/tests/functional/n/non/non_init_parent_called.py
@@ -1,5 +1,5 @@
-# pylint: disable=R0903,W0212,W0406,no-absolute-import,wrong-import-order, useless-object-inheritance,line-too-long
-
+# pylint: disable=W0212,W0406 # [use-symbolic-message-instead,use-symbolic-message-instead]
+# pylint: disable=no-absolute-import,wrong-import-order, useless-object-inheritance,too-few-public-methods,line-too-long
"""test for call to __init__ from a non ancestor class
"""
from __future__ import print_function
diff --git a/tests/functional/n/non/non_init_parent_called.txt b/tests/functional/n/non/non_init_parent_called.txt
new file mode 100644
index 000000000..76a797c48
--- /dev/null
+++ b/tests/functional/n/non/non_init_parent_called.txt
@@ -0,0 +1,8 @@
+use-symbolic-message-instead:1:0::Id 'W0212' is used to disable 'protected-access' message emission
+use-symbolic-message-instead:1:0::Id 'W0406' is used to disable 'import-self' message emission
+import-error:7:0::Unable to import 'nonexistant'
+non-parent-init-called:15:8:AAAA.__init__:__init__ method from a non direct base class 'BBBBMixin' is called
+no-member:23:50:CCC:Module 'functional.n.non.non_init_parent_called' has no 'BBBB' member:INFERENCE
+no-member:28:8:CCC.__init__:Module 'functional.n.non.non_init_parent_called' has no 'BBBB' member:INFERENCE
+super-init-not-called:49:4:Super2.__init__:__init__ method from base class 'dict' is not called
+no-member:51:8:Super2.__init__:Super of 'Super2' has no '__woohoo__' member:INFERENCE
diff --git a/tests/functional/n/non_iterator_returned.py b/tests/functional/n/non/non_iterator_returned.py
index 89bcdb7d9..89bcdb7d9 100644
--- a/tests/functional/n/non_iterator_returned.py
+++ b/tests/functional/n/non/non_iterator_returned.py
diff --git a/tests/functional/n/non_iterator_returned.txt b/tests/functional/n/non/non_iterator_returned.txt
index ab9d69e7e..ab9d69e7e 100644
--- a/tests/functional/n/non_iterator_returned.txt
+++ b/tests/functional/n/non/non_iterator_returned.txt
diff --git a/tests/functional/n/non_str_assignment_to_dunder_name.py b/tests/functional/n/non/non_str_assignment_to_dunder_name.py
index a910cbd6f..a910cbd6f 100644
--- a/tests/functional/n/non_str_assignment_to_dunder_name.py
+++ b/tests/functional/n/non/non_str_assignment_to_dunder_name.py
diff --git a/tests/functional/n/non_str_assignment_to_dunder_name.txt b/tests/functional/n/non/non_str_assignment_to_dunder_name.txt
index b6cc0ce5d..b6cc0ce5d 100644
--- a/tests/functional/n/non_str_assignment_to_dunder_name.txt
+++ b/tests/functional/n/non/non_str_assignment_to_dunder_name.txt
diff --git a/tests/functional/n/non_init_parent_called.txt b/tests/functional/n/non_init_parent_called.txt
deleted file mode 100644
index 2dc98a361..000000000
--- a/tests/functional/n/non_init_parent_called.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-import-error:7:0::Unable to import 'nonexistant'
-non-parent-init-called:15:8:AAAA.__init__:__init__ method from a non direct base class 'BBBBMixin' is called
-no-member:23:50:CCC:Module 'functional.n.non_init_parent_called' has no 'BBBB' member:INFERENCE
-no-member:28:8:CCC.__init__:Module 'functional.n.non_init_parent_called' has no 'BBBB' member:INFERENCE
-super-init-not-called:49:4:Super2.__init__:__init__ method from base class 'dict' is not called
-no-member:51:8:Super2.__init__:Super of 'Super2' has no '__woohoo__' member:INFERENCE
diff --git a/tests/functional/o/object_as_class_attribute.py b/tests/functional/o/object_as_class_attribute.py
index 71cd027b7..2ac729b36 100644
--- a/tests/functional/o/object_as_class_attribute.py
+++ b/tests/functional/o/object_as_class_attribute.py
@@ -1,4 +1,4 @@
-# pylint: disable=R0903, useless-object-inheritance
+# pylint: disable=too-few-public-methods,useless-object-inheritance
"""Test case for the problem described below :
- A class extends 'object'
- This class defines its own __init__()
diff --git a/tests/functional/o/overloaded_operator.py b/tests/functional/o/overloaded_operator.py
index 3a158b00b..c305af689 100644
--- a/tests/functional/o/overloaded_operator.py
+++ b/tests/functional/o/overloaded_operator.py
@@ -1,4 +1,4 @@
-# pylint: disable=C0111,R0903, useless-object-inheritance
+# pylint: disable=missing-docstring,too-few-public-methods,useless-object-inheritance
"""#3291"""
from __future__ import print_function
diff --git a/tests/functional/p/pragma_after_backslash.py b/tests/functional/p/pragma_after_backslash.py
index c506f6c9d..05fa0f6ae 100644
--- a/tests/functional/p/pragma_after_backslash.py
+++ b/tests/functional/p/pragma_after_backslash.py
@@ -1,5 +1,5 @@
"""Test that a pragma has an effect when separated by a backslash."""
-# pylint: disable=too-few-public-methods
+# pylint: disable=too-few-public-methods,use-symbolic-message-instead
class Foo:
"""block-disable test"""
diff --git a/tests/functional/p/property_affectation_py26.py b/tests/functional/p/property_affectation_py26.py
index 60118bbf6..323cf2d05 100644
--- a/tests/functional/p/property_affectation_py26.py
+++ b/tests/functional/p/property_affectation_py26.py
@@ -1,4 +1,4 @@
-# pylint: disable=R0903, useless-object-inheritance
+# pylint: disable=too-few-public-methods, useless-object-inheritance
"""
Simple test case for an annoying behavior in pylint.
"""
diff --git a/tests/functional/s/string/string_log_formatting.py b/tests/functional/s/string/string_log_formatting.py
index 0aca73dbc..e03d47f59 100644
--- a/tests/functional/s/string/string_log_formatting.py
+++ b/tests/functional/s/string/string_log_formatting.py
@@ -1,4 +1,4 @@
-# pylint: disable=E1101, no-absolute-import
+# pylint: disable=no-absolute-import
"""Test checking of log format strings
"""
diff --git a/tests/functional/u/unsubscriptable_value_py37.py b/tests/functional/u/unsubscriptable_value_py37.py
index c7b06cfb2..acbbe6bdd 100644
--- a/tests/functional/u/unsubscriptable_value_py37.py
+++ b/tests/functional/u/unsubscriptable_value_py37.py
@@ -1,18 +1,16 @@
+# pylint: disable=missing-class-docstring,too-few-public-methods,pointless-statement,expression-not-assigned
"""
Checks that class used in a subscript supports subscription
(i.e. defines __class_getitem__ method).
"""
-# pylint: disable=missing-docstring,pointless-statement,expression-not-assigned,wrong-import-position
-# pylint: disable=too-few-public-methods,import-error,invalid-name,wrong-import-order, useless-object-inheritance
-
import typing
-class Subscriptable(object):
+
+class Subscriptable:
def __class_getitem__(cls, params):
pass
-
Subscriptable[0]
Subscriptable()[0] # [unsubscriptable-object]
diff --git a/tests/functional/u/unsubscriptable_value_py37.txt b/tests/functional/u/unsubscriptable_value_py37.txt
index 8eafbbd70..b5959971a 100644
--- a/tests/functional/u/unsubscriptable_value_py37.txt
+++ b/tests/functional/u/unsubscriptable_value_py37.txt
@@ -1 +1 @@
-unsubscriptable-object:17:0::Value 'Subscriptable()' is unsubscriptable
+unsubscriptable-object:15:0::Value 'Subscriptable()' is unsubscriptable
diff --git a/tests/functional/u/unused/unused_argument.py b/tests/functional/u/unused/unused_argument.py
index f0b435f70..3c67e89fe 100644
--- a/tests/functional/u/unused/unused_argument.py
+++ b/tests/functional/u/unused/unused_argument.py
@@ -47,7 +47,7 @@ def metadata_from_dict(key):
"""
return {key: str(value) for key, value in key.items()}
-# pylint: disable=R0903, print-statement, misplaced-future,wrong-import-position
+# pylint: disable=too-few-public-methods, print-statement, misplaced-future,wrong-import-position
from __future__ import print_function
@@ -78,7 +78,7 @@ class AAAA(object):
"""inner using all its argument"""
# pylint: disable = E1103
return req.vreg.etype_class(etype)(req, rset, row, col)
- # pylint: disable = W0201
+ # pylint: disable = attribute-defined-outside-init
rset.get_entity = inner
class BBBB(object):