Skip to content

Commit 9ec61e5

Browse files
committed
chore: Add type hints to AndroidConfig
1 parent 880ba95 commit 9ec61e5

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

firebase_admin/_messaging_utils.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
# limitations under the License.
1414

1515
"""Types and utilities used by the messaging (FCM) module."""
16+
from __future__ import annotations
17+
import datetime
18+
from typing import Dict, Optional, Union
1619

1720
from firebase_admin import exceptions
1821

@@ -57,9 +60,19 @@ class AndroidConfig:
5760
delivered to the app while the device is on a restricted satellite network (optional).
5861
"""
5962

60-
def __init__(self, collapse_key=None, priority=None, ttl=None, restricted_package_name=None,
61-
data=None, notification=None, fcm_options=None, direct_boot_ok=None,
62-
bandwidth_constrained_ok=None, restricted_satellite_ok=None):
63+
def __init__(
64+
self,
65+
collapse_key: Optional[str] = None,
66+
priority: Optional[str] = None,
67+
ttl: Optional[Union[int, float, datetime.timedelta]] = None,
68+
restricted_package_name: Optional[str] = None,
69+
data: Optional[Dict[str, str]] = None,
70+
notification: Optional[AndroidNotification] = None,
71+
fcm_options: Optional[AndroidFCMOptions] = None,
72+
direct_boot_ok: Optional[bool] = None,
73+
bandwidth_constrained_ok: Optional[bool] = None,
74+
restricted_satellite_ok: Optional[bool] = None
75+
):
6376
self.collapse_key = collapse_key
6477
self.priority = priority
6578
self.ttl = ttl

0 commit comments

Comments
 (0)