eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/flaskDebug.py

branch
maintenance
changeset 8273
698ae46f40a4
parent 8222
5994b80b8760
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/flaskDebug.py	Fri Apr 02 11:59:41 2021 +0200
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/flaskDebug.py	Sat May 01 14:27:20 2021 +0200
@@ -42,13 +42,15 @@
     @param config dictionary with configuration data
     @type dict
     """
-    if context.isModuleImportedLike('flask'):
-        if context.callFunctionNameQual.endswith('.run'):
-            if context.checkCallArgValue('debug', 'True'):
-                reportError(
-                    context.node.lineno - 1,
-                    context.node.col_offset,
-                    "S201",
-                    "L",
-                    "M"
-                )
+    if (
+        context.isModuleImportedLike('flask') and
+        context.callFunctionNameQual.endswith('.run') and
+        context.checkCallArgValue('debug', 'True')
+    ):
+        reportError(
+            context.node.lineno - 1,
+            context.node.col_offset,
+            "S201",
+            "L",
+            "M"
+        )

eric ide

mercurial