summaryrefslogtreecommitdiff
path: root/pylint/checkers
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/checkers')
-rw-r--r--pylint/checkers/__init__.py7
-rw-r--r--pylint/checkers/python3.py3
-rw-r--r--pylint/checkers/raw_metrics.py3
-rw-r--r--pylint/checkers/spelling.py6
-rw-r--r--pylint/checkers/variables.py2
5 files changed, 12 insertions, 9 deletions
diff --git a/pylint/checkers/__init__.py b/pylint/checkers/__init__.py
index f5457437b..22eab4466 100644
--- a/pylint/checkers/__init__.py
+++ b/pylint/checkers/__init__.py
@@ -42,6 +42,7 @@ messages nor reports. XXX not true, emit a 07 report !
import sys
import tokenize
import warnings
+from typing import Any
from pylint.config import OptionsProviderMixIn
from pylint.reporters import diff_string
@@ -77,11 +78,11 @@ class BaseChecker(OptionsProviderMixIn):
# options level (0 will be displaying in --help, 1 in --long-help)
level = 1
# ordered list of options to control the ckecker behaviour
- options = () # type: ignore
+ options = () # type: Any
# messages issued by this checker
- msgs = {} # type: ignore
+ msgs = {} # type: Any
# reports issued by this checker
- reports = ()
+ reports = () # type: Any
# mark this checker as enabled or not.
enabled = True
diff --git a/pylint/checkers/python3.py b/pylint/checkers/python3.py
index 75f01b2d0..61938bf96 100644
--- a/pylint/checkers/python3.py
+++ b/pylint/checkers/python3.py
@@ -30,6 +30,7 @@ from collections import namedtuple
import re
import sys
import tokenize
+from typing import FrozenSet
import astroid
from astroid import bases
@@ -575,7 +576,7 @@ class Python3Checker(checkers.BaseChecker):
if (3, 4) <= sys.version_info < (3, 4, 4):
# Python 3.4.0 -> 3.4.3 has a bug which breaks `repr_tree()`:
# https://bugs.python.org/issue23572
- _python_2_tests = frozenset()
+ _python_2_tests = frozenset() # type: FrozenSet[str]
else:
_python_2_tests = frozenset(
[astroid.extract_node(x).repr_tree() for x in [
diff --git a/pylint/checkers/raw_metrics.py b/pylint/checkers/raw_metrics.py
index 7070621f7..08b76db38 100644
--- a/pylint/checkers/raw_metrics.py
+++ b/pylint/checkers/raw_metrics.py
@@ -16,6 +16,7 @@ Raw metrics checker
"""
import tokenize
+from typing import Any
from pylint.interfaces import ITokenChecker
from pylint.exceptions import EmptyReportError
@@ -62,7 +63,7 @@ class RawMetricsChecker(BaseTokenChecker):
# configuration options
options = ()
# messages
- msgs = {}
+ msgs = {} # type: Any
# reports
reports = (('RP0701', 'Raw metrics', report_raw_stats),)
diff --git a/pylint/checkers/spelling.py b/pylint/checkers/spelling.py
index ff9b68dd3..6985aa7bd 100644
--- a/pylint/checkers/spelling.py
+++ b/pylint/checkers/spelling.py
@@ -24,7 +24,7 @@ import re
try:
import enchant
- from enchant.tokenize import (get_tokenizer,
+ from enchant.tokenize import (get_tokenizer, # type: ignore
Chunker,
Filter,
EmailFilter,
@@ -33,11 +33,11 @@ try:
except ImportError:
enchant = None
# pylint: disable=no-init
- class Filter:
+ class Filter: # type: ignore
def _skip(self, word):
raise NotImplementedError
- class Chunker:
+ class Chunker: # type: ignore
pass
diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py
index 2b6e2f0ec..679d15297 100644
--- a/pylint/checkers/variables.py
+++ b/pylint/checkers/variables.py
@@ -1597,7 +1597,7 @@ class VariablesChecker3k(VariablesChecker):
if sys.version_info >= (3, 0):
- VariablesChecker = VariablesChecker3k
+ VariablesChecker = VariablesChecker3k # type: ignore
def register(linter):