27 (checkRequestWithouTimeout, ("S114",)), |
27 (checkRequestWithouTimeout, ("S114",)), |
28 ], |
28 ], |
29 } |
29 } |
30 |
30 |
31 |
31 |
32 def checkRequestWithouTimeout(reportError, context, config): # noqa: U100 |
32 def checkRequestWithouTimeout(reportError, context, _config): |
33 """ |
33 """ |
34 Function to check for use of requests without timeout. |
34 Function to check for use of requests without timeout. |
35 |
35 |
36 @param reportError function to be used to report errors |
36 @param reportError function to be used to report errors |
37 @type func |
37 @type func |
38 @param context security context object |
38 @param context security context object |
39 @type SecurityContext |
39 @type SecurityContext |
40 @param config dictionary with configuration data |
40 @param _config dictionary with configuration data (unused) |
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 qualName = context.callFunctionNameQual.split(".")[0] |
44 qualName = context.callFunctionNameQual.split(".")[0] |
45 if qualName == "requests" and context.callFunctionName in httpVerbs: |
45 if qualName == "requests" and context.callFunctionName in httpVerbs: |