Add type annotation to mention.py, redis_utils.py, timestamp.py, user_agent.py

Some functions in models.py had input typed as int when they needed to be typed as datetime.datetime
This commit is contained in:
Max
2016-06-03 14:32:55 -07:00
committed by Tim Abbott
parent 1148f6ff8a
commit 0f4673ae3b
5 changed files with 8 additions and 2 deletions

View File

@@ -923,7 +923,7 @@ class Message(models.Model):
recipient_type,
recipient_type_id,
):
# type: (bool, Message, int, int, str, str, str, int, str, int, int, str, str, str, str, str, bool, str, int, int, int) -> Dict[str, Any]
# type: (bool, Message, int, datetime.datetime, str, str, str, datetime.datetime, str, int, int, str, str, str, str, str, bool, str, int, int, int) -> Dict[str, Any]
global bugdown
if bugdown is None:
from zerver.lib import bugdown
@@ -1395,7 +1395,7 @@ class UserPresence(models.Model):
@staticmethod
def to_presence_dict(client_name=None, status=None, dt=None, push_enabled=None,
has_push_devices=None, is_mirror_dummy=None):
# type: (Optional[str], Optional[int], Optional[int], Optional[bool], Optional[bool], Optional[bool]) -> Dict[str, Any]
# type: (Optional[str], Optional[int], Optional[datetime.datetime], Optional[bool], Optional[bool], Optional[bool]) -> Dict[str, Any]
presence_val = UserPresence.status_to_string(status)
timestamp = datetime_to_timestamp(dt)