Skip to content

Commit d98cef7

Browse files
authored
Add typing to file visiting attributes of PyLinter (#5576)
1 parent 52576b7 commit d98cef7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pylint/lint/pylinter.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,11 +540,13 @@ def __init__(
540540
self.msgs_store = MessageDefinitionStore()
541541
self._checkers = collections.defaultdict(list)
542542
self._pragma_lineno = {}
543-
self._ignore_file = False
544-
# visit variables
543+
544+
# Attributes related to visiting files
545545
self.file_state = FileState()
546546
self.current_name: Optional[str] = None
547-
self.current_file = None
547+
self.current_file: Optional[str] = None
548+
self._ignore_file = False
549+
548550
self.stats = LinterStats()
549551
self.fail_on_symbols = []
550552
# init options
@@ -1491,7 +1493,7 @@ def _add_one_message(
14911493
message_definition.msgid,
14921494
message_definition.symbol,
14931495
MessageLocationTuple(
1494-
abspath,
1496+
abspath or "",
14951497
path,
14961498
module or "",
14971499
obj,

0 commit comments

Comments
 (0)