src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/yamlLoad.py

branch
eric7
changeset 9325
8157eb19aba5
parent 9221
bf71ee032bb4
child 9653
e67609152c5e
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/yamlLoad.py	Tue Sep 13 19:46:19 2022 +0200
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/yamlLoad.py	Tue Sep 13 20:00:55 2022 +0200
@@ -33,7 +33,7 @@
 
 def checkYamlLoad(reportError, context, config):
     """
-    Function to check for the use of of yaml load functions.
+    Function to check for the use of yaml load functions.
 
     @param reportError function to be used to report errors
     @type func
@@ -55,6 +55,8 @@
             func == "load",
             not context.checkCallArgValue("Loader", "SafeLoader"),
             not context.checkCallArgValue("Loader", "CSafeLoader"),
+            context.getCallArgAtPosition(1) != "SafeLoader",
+            context.getCallArgAtPosition(1) != "CSafeLoader",
         ]
     ):
         reportError(context.node.lineno - 1, context.node.col_offset, "S506", "M", "H")

eric ide

mercurial