Skip to content

Commit 397ae8c

Browse files
committed
fixup! fixup! Add type hints and mypy
1 parent 500146a commit 397ae8c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packet/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def by_username(cls, username: str) -> 'Packet':
5151
return cls.query.filter_by(rit_username=username).first()
5252

5353
@classmethod
54-
def get_all(cls) -> list[Packet]:
54+
def get_all(cls) -> list['Packet']:
5555
"""
5656
Helper method to get all freshmen easily
5757
"""
@@ -123,14 +123,14 @@ def is_100(self) -> bool:
123123
return self.signatures_required().total == self.signatures_received().total
124124

125125
@classmethod
126-
def open_packets(cls) -> list[Packet]:
126+
def open_packets(cls) -> list['Packet']:
127127
"""
128128
Helper method for fetching all currently open packets
129129
"""
130130
return cls.query.filter(cls.start < datetime.now(), cls.end > datetime.now()).all()
131131

132132
@classmethod
133-
def by_id(cls, packet_id: int) -> Packet:
133+
def by_id(cls, packet_id: int) -> 'Packet':
134134
"""
135135
Helper method for fetching 1 packet by its id
136136
"""

packet/notifications.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from datetime import datetime
22
from typing import Any, Callable, TypeVar, cast
33

4-
import onesignal_sdk as onesignal
4+
import onesignal_sdk.client as onesignal
55

66
from packet import app, intro_onesignal_client, csh_onesignal_client
77
from packet.models import NotificationSubscription, Packet

0 commit comments

Comments
 (0)