Skip to content

Commit

Permalink
move modules names set to LinterStats
Browse files Browse the repository at this point in the history
Signed-off-by: Alvaro Frias Garay <alvarofriasgaray@gmail.com>
  • Loading branch information
qequ authored and Pierre-Sassoulas committed May 3, 2024
1 parent b3f6f73 commit cde7da3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pylint/lint/pylinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ def __init__(
self.current_file: str | None = None
self._ignore_file = False
self._ignore_paths: list[Pattern[str]] = []
self._files_checked = set()

self.register_checker(self)

Expand Down Expand Up @@ -750,7 +749,7 @@ def _lint_files(
continue
try:
self._lint_file(fileitem, module, check_astroid_module)
self._files_checked.add(fileitem.filepath)
self.stats.modules_names.add(fileitem.filepath)
except Exception as ex: # pylint: disable=broad-except
template_path = prepare_crash_report(
ex, fileitem.filepath, self.crash_file_path
Expand Down Expand Up @@ -1143,7 +1142,7 @@ def _report_evaluation(self, verbose: bool = False) -> int | None:
if verbose:
checked_files_count = self.stats.node_count["module"]
unchecked_files_count = self.stats.undocumented["module"]
checked_files = ', '.join(self._files_checked)
checked_files = ", ".join(self.stats.modules_names)
msg += f"\nChecked {checked_files_count} files ({checked_files}), skipped {unchecked_files_count} files"

if self.config.score:
Expand Down
1 change: 1 addition & 0 deletions pylint/utils/linterstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def __init__(
self.code_type_count = code_type_count or CodeTypeCount(
code=0, comment=0, docstring=0, empty=0, total=0
)
self.modules_names: set[str] = set()

self.dependencies: dict[str, set[str]] = dependencies or {}
self.duplicated_lines = duplicated_lines or DuplicatedLines(
Expand Down

0 comments on commit cde7da3

Please sign in to comment.