Skip to content

Commit

Permalink
Fix Apprise Mypy checks added in 1.8.0 (#39580)
Browse files Browse the repository at this point in the history
(cherry picked from commit 79042cf)
  • Loading branch information
potiuk authored and ephraimbuddy committed Jun 6, 2024
1 parent 688a7ac commit f56f134
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions airflow/providers/apprise/hooks/apprise.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down Expand Up @@ -72,7 +75,7 @@ def notify(
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,
):
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/apprise/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ integrations:

dependencies:
- apache-airflow>=2.6.0
- apprise
- apprise>=1.8.0

hooks:
- integration-name: Apprise
Expand Down
2 changes: 1 addition & 1 deletion generated/provider_dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
"apprise": {
"deps": [
"apache-airflow>=2.6.0",
"apprise"
"apprise>=1.8.0"
],
"devel-deps": [],
"cross-providers-deps": [],
Expand Down

0 comments on commit f56f134

Please sign in to comment.