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

changeset 8222
5994b80b8760
parent 7923
91e843545d9a
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/blackListImports.py	Sun Apr 11 16:53:48 2021 +0200
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/blackListImports.py	Sun Apr 11 18:45:10 2021 +0200
@@ -107,9 +107,11 @@
 
     if nodeType.startswith('Import'):
         prefix = ""
-        if nodeType == "ImportFrom":
-            if context.node.module is not None:
-                prefix = context.node.module + "."
+        if (
+            nodeType == "ImportFrom" and
+            context.node.module is not None
+        ):
+            prefix = context.node.module + "."
 
         for code in _blacklists:
             qualnames, severity = _blacklists[code]

eric ide

mercurial