fix check_for_async_http_handler

This commit is contained in:
Ishaan Jaff 2024-11-21 10:45:57 -08:00
parent ce0061d136
commit 81c0125737

View file

@ -43,14 +43,6 @@ def check_for_async_http_handler(file_path):
raise ValueError(
f"found violation in file {file_path} line: {node.lineno}. Please use `get_async_httpx_client` instead. {warning_msg}"
)
# Add check for httpx.AsyncClient
elif isinstance(node.func, ast.Attribute) and isinstance(
node.func.value, ast.Name
):
if node.func.value.id == "httpx" and node.func.attr == "AsyncClient":
raise ValueError(
f"found violation in file {file_path} line: {node.lineno}. Please use `get_async_httpx_client` instead. {warning_msg}"
)
return violations