diff options
author | Andres Perez Hortal <andresperezcba@gmail.com> | 2019-07-29 09:53:55 -0400 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-07-29 15:53:55 +0200 |
commit | 41c95225fe398dd3f62f48d777080dc8827b145c (patch) | |
tree | 0cb8411d9fe840c02a9f2227880c67a741b8d5e4 /pylint/lint.py | |
parent | eae3436de87df5abb08a4583e345e7afa5510ac9 (diff) | |
download | pylint-git-41c95225fe398dd3f62f48d777080dc8827b145c.tar.gz |
Fix number of statements in by_module stats (#3023)
Previously, self.stats['by_module'][modname]["statement"] was
initialized to 0 and never updated once the module was processed.
Diffstat (limited to 'pylint/lint.py')
-rw-r--r-- | pylint/lint.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pylint/lint.py b/pylint/lint.py index af0048dfe..03c31bd8e 100644 --- a/pylint/lint.py +++ b/pylint/lint.py @@ -1144,7 +1144,11 @@ class PyLinter( # 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 + before_check_statements = walker.nbstatements self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers) + self.stats["by_module"][modname]["statement"] = ( + walker.nbstatements - before_check_statements + ) # warn about spurious inline messages handling spurious_messages = self.file_state.iter_spurious_suppression_messages( self.msgs_store |