40 @param context security context object |
40 @param context security context object |
41 @type SecurityContext |
41 @type SecurityContext |
42 @param _config dictionary with configuration data (unused) |
42 @param _config dictionary with configuration data (unused) |
43 @type dict |
43 @type dict |
44 """ |
44 """ |
45 httpVerbs = ("get", "options", "head", "post", "put", "patch", "delete") |
45 httpVerbs = {"get", "options", "head", "post", "put", "patch", "delete"} |
46 httpxAttrs = ("request", "stream", "Client", "AsyncClient") + httpVerbs |
46 httpxAttrs = {"request", "stream", "Client", "AsyncClient"} | httpVerbs |
47 qualName = context.callFunctionNameQual.split(".")[0] |
47 qualName = context.callFunctionNameQual.split(".")[0] |
48 if ( |
48 if ( |
49 (qualName == "requests" and context.callFunctionName in httpVerbs) |
49 (qualName == "requests" and context.callFunctionName in httpVerbs) |
50 or (qualName == "httpx" and context.callFunctionName in httpxAttrs) |
50 or (qualName == "httpx" and context.callFunctionName in httpxAttrs) |
51 ) and context.checkCallArgValue("verify", "False"): |
51 ) and context.checkCallArgValue("verify", "False"): |