eric6/DataViews/CodeMetrics.py

changeset 8222
5994b80b8760
parent 8207
d359172d11be
child 8234
fcb6b4b96274
--- a/eric6/DataViews/CodeMetrics.py	Sun Apr 11 16:53:48 2021 +0200
+++ b/eric6/DataViews/CodeMetrics.py	Sun Apr 11 18:45:10 2021 +0200
@@ -233,9 +233,11 @@
             stats.indent(tok)
         elif tok.type == DEDENT:
             stats.dedent(tok)
-        elif tok.type == KEYWORD:
-            if tok.text in ("class", "def"):
-                stats.push(parser.tokenlist[idx + 1].text, tok.row)
+        elif (
+            tok.type == KEYWORD and
+            tok.text in ("class", "def")
+        ):
+            stats.push(parser.tokenlist[idx + 1].text, tok.row)
 
     # collect overall statistics
     summarize(total, 'lines', parser.lines)

eric ide

mercurial