Skip to content

Commit f56f134

Browse files
potiukephraimbuddy
authored andcommitted
Fix Apprise Mypy checks added in 1.8.0 (#39580)
(cherry picked from commit 79042cf)
1 parent 688a7ac commit f56f134

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

airflow/providers/apprise/hooks/apprise.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@
1818
from __future__ import annotations
1919

2020
import json
21-
from typing import Any, Iterable
21+
from typing import TYPE_CHECKING, Any, Iterable
2222

2323
import apprise
2424
from apprise import AppriseConfig, NotifyFormat, NotifyType
2525

2626
from airflow.hooks.base import BaseHook
2727

28+
if TYPE_CHECKING:
29+
from apprise import AppriseAttachment
30+
2831

2932
class AppriseHook(BaseHook):
3033
"""
@@ -72,7 +75,7 @@ def notify(
7275
notify_type: NotifyType = NotifyType.INFO,
7376
body_format: NotifyFormat = NotifyFormat.TEXT,
7477
tag: str | Iterable[str] | None = None,
75-
attach: str | Iterable[str] | None = None,
78+
attach: AppriseAttachment | None = None,
7679
interpret_escapes: bool | None = None,
7780
config: AppriseConfig | None = None,
7881
):

airflow/providers/apprise/provider.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ integrations:
4343

4444
dependencies:
4545
- apache-airflow>=2.6.0
46-
- apprise
46+
- apprise>=1.8.0
4747

4848
hooks:
4949
- integration-name: Apprise

generated/provider_dependencies.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
"apprise": {
252252
"deps": [
253253
"apache-airflow>=2.6.0",
254-
"apprise"
254+
"apprise>=1.8.0"
255255
],
256256
"devel-deps": [],
257257
"cross-providers-deps": [],

0 commit comments

Comments
 (0)