dondaum commented on code in PR #56911: URL: https://github.com/apache/airflow/pull/56911#discussion_r2446985521
########## providers/discord/src/airflow/providers/discord/hooks/discord_webhook.py: ########## @@ -19,10 +19,70 @@ import json import re -from typing import Any +from typing import TYPE_CHECKING, Any + +import aiohttp +from asgiref.sync import sync_to_async from airflow.exceptions import AirflowException -from airflow.providers.http.hooks.http import HttpHook +from airflow.providers.http.hooks.http import HttpAsyncHook, HttpHook + +if TYPE_CHECKING: + from airflow.providers.discord.version_compat import Connection + + +class DiscordCommonHandler: + """Contains the common functionality.""" + + def get_webhook_endpoint(self, conn: Connection, webhook_endpoint: str | None) -> str: + """ Review Comment: Thank you for your review. I fixed both. `ruff` removed the `Connection` object from the `version_compat` module because I didn't add it in `__all__`. I didn't notice that. Thanks for recognizing it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
