summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-02-06 08:16:21 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2021-02-07 10:28:18 +0100
commit68d92193a3bf5eb66908c20fddb645450dbaffa2 (patch)
treee36f39f8ee07bf7f8a55e376ce71c5996236722b
parent1e33631d5b46558f4df460534dac55c49fb3cd09 (diff)
downloadpylint-git-68d92193a3bf5eb66908c20fddb645450dbaffa2.tar.gz
Fix need type annotation for 'CONFIG'
-rw-r--r--pylint/testutils/checker_test_case.py3
-rw-r--r--tests/checkers/unittest_base.py7
2 files changed, 6 insertions, 4 deletions
diff --git a/pylint/testutils/checker_test_case.py b/pylint/testutils/checker_test_case.py
index 9b8281513..303dc42e7 100644
--- a/pylint/testutils/checker_test_case.py
+++ b/pylint/testutils/checker_test_case.py
@@ -2,6 +2,7 @@
# For details: https://github.com/PyCQA/pylint/blob/master/COPYING
import contextlib
+from typing import Dict
from pylint.testutils.global_test_linter import linter
from pylint.testutils.unittest_linter import UnittestLinter
@@ -12,7 +13,7 @@ class CheckerTestCase:
"""A base testcase class for unit testing individual checker classes."""
CHECKER_CLASS = None
- CONFIG = {}
+ CONFIG: Dict = {}
def setup_method(self):
self.linter = UnittestLinter()
diff --git a/tests/checkers/unittest_base.py b/tests/checkers/unittest_base.py
index 02ec36e5e..1ac40d59b 100644
--- a/tests/checkers/unittest_base.py
+++ b/tests/checkers/unittest_base.py
@@ -25,6 +25,7 @@
import re
import sys
import unittest
+from typing import Dict, Type
import astroid
@@ -33,7 +34,7 @@ from pylint.testutils import CheckerTestCase, Message, set_config
class TestDocstring(CheckerTestCase):
- CHECKER_CLASS = base.DocStringChecker
+ CHECKER_CLASS: Type = base.DocStringChecker
def test_missing_docstring_module(self):
module = astroid.parse("something")
@@ -135,8 +136,8 @@ class TestDocstring(CheckerTestCase):
class TestNameChecker(CheckerTestCase):
- CHECKER_CLASS = base.NameChecker
- CONFIG = {"bad_names": set()}
+ CHECKER_CLASS: Type = base.NameChecker
+ CONFIG: Dict = {"bad_names": set()}
@set_config(
attr_rgx=re.compile("[A-Z]+"),