This is an automated email from the ASF dual-hosted git repository.

uranusjr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 79042cff41 Fix Apprise Mypy checks added in 1.8.0 (#39580)
79042cff41 is described below

commit 79042cff416296c8bdbd64f2e0a5f4d46c93e882
Author: Jarek Potiuk <[email protected]>
AuthorDate: Mon May 13 06:40:27 2024 +0200

    Fix Apprise Mypy checks added in 1.8.0 (#39580)
---
 airflow/providers/apprise/hooks/apprise.py | 7 +++++--
 airflow/providers/apprise/provider.yaml    | 2 +-
 generated/provider_dependencies.json       | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/airflow/providers/apprise/hooks/apprise.py 
b/airflow/providers/apprise/hooks/apprise.py
index 8ff3dadd9f..85b36a6b4a 100644
--- a/airflow/providers/apprise/hooks/apprise.py
+++ b/airflow/providers/apprise/hooks/apprise.py
@@ -18,13 +18,16 @@
 from __future__ import annotations
 
 import json
-from typing import Any, Iterable
+from typing import TYPE_CHECKING, Any, Iterable
 
 import apprise
 from apprise import AppriseConfig, NotifyFormat, NotifyType
 
 from airflow.hooks.base import BaseHook
 
+if TYPE_CHECKING:
+    from apprise import AppriseAttachment
+
 
 class AppriseHook(BaseHook):
     """
@@ -72,7 +75,7 @@ class AppriseHook(BaseHook):
         notify_type: NotifyType = NotifyType.INFO,
         body_format: NotifyFormat = NotifyFormat.TEXT,
         tag: str | Iterable[str] | None = None,
-        attach: str | Iterable[str] | None = None,
+        attach: AppriseAttachment | None = None,
         interpret_escapes: bool | None = None,
         config: AppriseConfig | None = None,
     ):
diff --git a/airflow/providers/apprise/provider.yaml 
b/airflow/providers/apprise/provider.yaml
index 41f0876b42..bd8b7f8d61 100644
--- a/airflow/providers/apprise/provider.yaml
+++ b/airflow/providers/apprise/provider.yaml
@@ -44,7 +44,7 @@ integrations:
 
 dependencies:
   - apache-airflow>=2.7.0
-  - apprise
+  - apprise>=1.8.0
 
 hooks:
   - integration-name: Apprise
diff --git a/generated/provider_dependencies.json 
b/generated/provider_dependencies.json
index fe96684a62..d2c0896ba8 100644
--- a/generated/provider_dependencies.json
+++ b/generated/provider_dependencies.json
@@ -262,7 +262,7 @@
   "apprise": {
     "deps": [
       "apache-airflow>=2.7.0",
-      "apprise"
+      "apprise>=1.8.0"
     ],
     "devel-deps": [],
     "cross-providers-deps": [],

Reply via email to