diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-11-07 23:28:48 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-11-07 23:30:46 +0100 |
commit | 4702343e09d5a6708a7cdcd67c5cb5c32bc0c662 (patch) | |
tree | a7ab8840c35e118c09f464b45b92a93926dd6106 /pylint | |
parent | 47b9a4e9e9ca2e55c13dd56c25e33c8bad532e1d (diff) | |
download | pylint-git-refactor-module-stats-creation.tar.gz |
Add a comment following reviewrefactor-module-stats-creation
See https://github.com/PyCQA/pylint/pull/5271\#issuecomment-962637958
Diffstat (limited to 'pylint')
-rw-r--r-- | pylint/utils/linterstats.py | 2 |
1 files changed, 2 insertions, 0 deletions
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 ) |