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

branch
eric7
changeset 10507
d1c6608155ef
parent 10439
21c28b0f9e41
child 10683
779cda568acb
equal deleted inserted replaced
10506:321555d0303b 10507:d1c6608155ef
39 @type SecurityContext 39 @type SecurityContext
40 @param config dictionary with configuration data 40 @param config dictionary with configuration data
41 @type dict 41 @type dict
42 """ 42 """
43 httpVerbs = ("get", "options", "head", "post", "put", "patch", "delete") 43 httpVerbs = ("get", "options", "head", "post", "put", "patch", "delete")
44 if ( 44 qualName = context.callFunctionNameQual.split(".")[0]
45 "requests" in context.callFunctionNameQual 45 if qualName == "requests" and context.callFunctionName in httpVerbs:
46 and context.callFunctionName in httpVerbs
47 ):
48 # check for missing timeout 46 # check for missing timeout
49 if context.checkCallArgValue("timeout") is None: 47 if context.checkCallArgValue("timeout") is None:
50 reportError( 48 reportError(
51 context.node.lineno - 1, 49 context.node.lineno - 1,
52 context.node.col_offset, 50 context.node.col_offset,

eric ide

mercurial