--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/requestWithoutTimeout.py Sun Feb 16 12:10:10 2025 +0100 +++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/requestWithoutTimeout.py Sun Feb 16 14:56:07 2025 +0100 @@ -44,31 +44,31 @@ httpxAttrs = {"request", "stream", "Client", "AsyncClient"} | 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( - context.node.lineno - 1, - context.node.col_offset, - "S114.1", - "M", - "L", - qualName, - ) - if ( qualName == "requests" and context.callFunctionName in httpVerbs - or qualName == "httpx" - and context.callFunctionName in httpxAttrs + and context.checkCallArgValue("timeout") is None ): + # check for missing timeout + reportError( + context.node.lineno - 1, + context.node.col_offset, + "S114.1", + "M", + "L", + qualName, + ) + + if ( + (qualName == "requests" and context.callFunctionName in httpVerbs) + or (qualName == "httpx" and context.callFunctionName in httpxAttrs) + ) and context.checkCallArgValue("timeout", "None"): # check for timeout=None - if context.checkCallArgValue("timeout", "None"): - reportError( - context.node.lineno - 1, - context.node.col_offset, - "S114.2", - "M", - "L", - qualName, - ) + reportError( + context.node.lineno - 1, + context.node.col_offset, + "S114.2", + "M", + "L", + qualName, + )