41 @type SecurityContext |
41 @type SecurityContext |
42 @param config dictionary with configuration data |
42 @param config dictionary with configuration data |
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 |
|
47 qualName = context.callFunctionNameQual.split(".")[0] |
46 if ( |
48 if ( |
47 "requests" in context.callFunctionNameQual |
49 ( |
48 and context.callFunctionName in httpVerbs |
50 ( |
|
51 qualName == "requests" |
|
52 and context.callFunctionName in httpVerbs |
|
53 ) |
|
54 or ( |
|
55 qualName == "httpx" |
|
56 and context.callFunctionName in httpxAttrs |
|
57 ) |
|
58 ) |
49 and context.checkCallArgValue("verify", "False") |
59 and context.checkCallArgValue("verify", "False") |
50 ): |
60 ): |
51 reportError( |
61 reportError( |
52 context.getLinenoForCallArg("verify") - 1, |
62 context.getLinenoForCallArg("verify") - 1, |
53 context.getOffsetForCallArg("verify"), |
63 context.getOffsetForCallArg("verify"), |