summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2021-12-21 15:56:14 +0100
committerGitHub <noreply@github.com>2021-12-21 15:56:14 +0100
commitd98cef76aac425be62a71fb689c5b510b429cef8 (patch)
treeddd3fc59f728f36f329fe3287dc32d93f73e0ccd
parent52576b7552b68593a3ea28e20cd3751ccdc106d7 (diff)
downloadpylint-git-d98cef76aac425be62a71fb689c5b510b429cef8.tar.gz
Add typing to file visiting attributes of ``PyLinter`` (#5576)
-rw-r--r--pylint/lint/pylinter.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/pylint/lint/pylinter.py b/pylint/lint/pylinter.py
index bfeec152d..fec268f74 100644
--- a/pylint/lint/pylinter.py
+++ b/pylint/lint/pylinter.py
@@ -540,11 +540,13 @@ class PyLinter(
self.msgs_store = MessageDefinitionStore()
self._checkers = collections.defaultdict(list)
self._pragma_lineno = {}
- self._ignore_file = False
- # visit variables
+
+ # Attributes related to visiting files
self.file_state = FileState()
self.current_name: Optional[str] = None
- self.current_file = None
+ self.current_file: Optional[str] = None
+ self._ignore_file = False
+
self.stats = LinterStats()
self.fail_on_symbols = []
# init options
@@ -1491,7 +1493,7 @@ class PyLinter(
message_definition.msgid,
message_definition.symbol,
MessageLocationTuple(
- abspath,
+ abspath or "",
path,
module or "",
obj,