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

branch
eric7
changeset 10507
d1c6608155ef
parent 10439
21c28b0f9e41
child 10683
779cda568acb
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/requestWithoutTimeout.py	Tue Jan 16 14:35:46 2024 +0100
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/requestWithoutTimeout.py	Tue Jan 16 18:24:06 2024 +0100
@@ -41,10 +41,8 @@
     @type dict
     """
     httpVerbs = ("get", "options", "head", "post", "put", "patch", "delete")
-    if (
-        "requests" in context.callFunctionNameQual
-        and context.callFunctionName in httpVerbs
-    ):
+    qualName = context.callFunctionNameQual.split(".")[0]
+    if qualName == "requests" and context.callFunctionName in httpVerbs:
         # check for missing timeout
         if context.checkCallArgValue("timeout") is None:
             reportError(

eric ide

mercurial