Skip to content

Commit

Permalink
Type hints don't work for py2.7 :(
Browse files Browse the repository at this point in the history
  • Loading branch information
jarshwah committed Jun 13, 2019
1 parent 21fb491 commit 78a2276
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/subscriptions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
from .states import SubscriptionState as State


def as_date(dt: datetime) -> date:
def as_date(dt):
# type: (datetime) -> date
if timezone.is_aware(dt):
return timezone.localdate(dt)
return dt.date()
Expand Down

0 comments on commit 78a2276

Please sign in to comment.