mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 16:01:58 +00:00
mypy: Annotate sent_time_in_epoch_seconds taking Optional[UserMessage].
This commit is contained in:
committed by
Greg Price
parent
7aacda1883
commit
2d3b95a088
@@ -59,9 +59,8 @@ def accounts_accept_terms(request):
|
||||
)
|
||||
|
||||
def sent_time_in_epoch_seconds(user_message):
|
||||
# type: (UserMessage) -> Optional[float]
|
||||
# user_message is a UserMessage object.
|
||||
if not user_message:
|
||||
# type: (Optional[UserMessage]) -> Optional[float]
|
||||
if user_message is None:
|
||||
return None
|
||||
# We have USE_TZ = True, so our datetime objects are timezone-aware.
|
||||
# Return the epoch seconds in UTC.
|
||||
|
||||
Reference in New Issue
Block a user