Skip to content

Commit

Permalink
Use NamedTuple more efficiently
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielNoord committed Sep 15, 2021
1 parent ccaaa86 commit 4c31342
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pylint/lint/pylinter.py
Expand Up @@ -1020,16 +1020,15 @@ def _check_file(self, get_ast, check_astroid_module, file: FileItem):
- ast: AST of the module
:param FileItem file: data about the file
"""
name, filepath, modname = file
self.set_current_module(name, filepath)
self.set_current_module(file.name, file.filepath)
# get the module representation
ast_node = get_ast(filepath, name)
ast_node = get_ast(file.filepath, file.name)
if ast_node is None:
return

self._ignore_file = False

self.file_state = FileState(modname)
self.file_state = FileState(file.modpath)
# fix the current file (if the source file was not available or
# if it's actually a c extension)
self.current_file = ast_node.file # pylint: disable=maybe-no-member
Expand Down

0 comments on commit 4c31342

Please sign in to comment.