summaryrefslogtreecommitdiff
path: root/tests/checkers
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2022-09-09 15:06:13 +0200
committerGitHub <noreply@github.com>2022-09-09 15:06:13 +0200
commit6524ba540cbfc4f11e924925faebe7e21f87942e (patch)
tree651c092d18df42eb18d0c066e5af8b996e0c46c7 /tests/checkers
parent2b6bd64d43ed109b1ee15f0993c010660cf56b13 (diff)
downloadpylint-git-6524ba540cbfc4f11e924925faebe7e21f87942e.tar.gz
Finish unfinished typing in non core directories (#7443)
* Add typing to setup calls in documentation folder * Finish some incomplete typing signatures in script * Add typing to unfinished signatures in the tests directory
Diffstat (limited to 'tests/checkers')
-rw-r--r--tests/checkers/base/unittest_base.py2
-rw-r--r--tests/checkers/unittest_non_ascii_name.py2
-rw-r--r--tests/checkers/unittest_spelling.py10
-rw-r--r--tests/checkers/unittest_utils.py2
4 files changed, 8 insertions, 8 deletions
diff --git a/tests/checkers/base/unittest_base.py b/tests/checkers/base/unittest_base.py
index 05a7271cd..99a8f659e 100644
--- a/tests/checkers/base/unittest_base.py
+++ b/tests/checkers/base/unittest_base.py
@@ -9,7 +9,7 @@ import unittest
class TestNoSix(unittest.TestCase):
@unittest.skip("too many dependencies need six :(")
- def test_no_six(self):
+ def test_no_six(self) -> None:
try:
has_six = True
except ImportError:
diff --git a/tests/checkers/unittest_non_ascii_name.py b/tests/checkers/unittest_non_ascii_name.py
index 7b1c9d7c6..4f854dddc 100644
--- a/tests/checkers/unittest_non_ascii_name.py
+++ b/tests/checkers/unittest_non_ascii_name.py
@@ -23,7 +23,7 @@ class TestNonAsciiChecker(pylint.testutils.CheckerTestCase):
@pytest.mark.skipif(
sys.version_info < (3, 8), reason="requires python3.8 or higher"
)
- def test_kwargs_and_position_only(self):
+ def test_kwargs_and_position_only(self) -> None:
"""Even the new position only and keyword only should be found."""
node = astroid.extract_node(
"""
diff --git a/tests/checkers/unittest_spelling.py b/tests/checkers/unittest_spelling.py
index b07212a19..abeb9dcf8 100644
--- a/tests/checkers/unittest_spelling.py
+++ b/tests/checkers/unittest_spelling.py
@@ -308,10 +308,10 @@ class TestSpellingChecker(CheckerTestCase): # pylint:disable=too-many-public-me
# to show up in the pytest output as part of the test name
# when running parameterized tests.
self,
- misspelled_portion_of_directive,
- second_portion_of_directive,
- description,
- ):
+ misspelled_portion_of_directive: str,
+ second_portion_of_directive: str,
+ description: str,
+ ) -> None:
full_comment = f"# {misspelled_portion_of_directive}{second_portion_of_directive} {misspelled_portion_of_directive}"
with self.assertAddsMessages(
MessageTest(
@@ -386,7 +386,7 @@ class TestSpellingChecker(CheckerTestCase): # pylint:disable=too-many-public-me
spelling_dict=spell_dict,
spelling_ignore_comment_directives="newdirective:,noqa",
)
- def test_skip_directives_specified_in_pylintrc(self):
+ def test_skip_directives_specified_in_pylintrc(self) -> None:
full_comment = "# newdirective: do this newdirective"
with self.assertAddsMessages(
MessageTest(
diff --git a/tests/checkers/unittest_utils.py b/tests/checkers/unittest_utils.py
index f68a48dbb..187c38c6a 100644
--- a/tests/checkers/unittest_utils.py
+++ b/tests/checkers/unittest_utils.py
@@ -25,7 +25,7 @@ from pylint.checkers.base_checker import BaseChecker
("mybuiltin", False),
],
)
-def testIsBuiltin(name, expected):
+def testIsBuiltin(name: str, expected: bool) -> None:
assert utils.is_builtin(name) == expected