From 4702343e09d5a6708a7cdcd67c5cb5c32bc0c662 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sun, 7 Nov 2021 23:28:48 +0100 Subject: Add a comment following review See https://github.com/PyCQA/pylint/pull/5271\#issuecomment-962637958 --- pylint/utils/linterstats.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pylint/utils/linterstats.py b/pylint/utils/linterstats.py index a9b3708c9..cb2085352 100644 --- a/pylint/utils/linterstats.py +++ b/pylint/utils/linterstats.py @@ -77,6 +77,7 @@ ModuleStatsAttribute = Literal[ "convention", "error", "fatal", "info", "refactor", "statement", "warning" ] + # pylint: disable-next=too-many-instance-attributes class LinterStats: """Class used to linter stats""" @@ -154,6 +155,7 @@ class LinterStats: {self.percent_duplicated_lines}""" def init_single_module(self, module_name: str) -> None: + """Use through Pylinter.set_current_module so Pyliner.current_name is consistent.""" self.by_module[module_name] = ModuleStats( convention=0, error=0, fatal=0, info=0, refactor=0, statement=0, warning=0 ) -- cgit v1.2.1