Minor typos fix

This commit is contained in:
Suren Khorenyan 2018-03-15 20:40:16 +03:00
parent f9c44bb2d7
commit 11fc718c40

View file

@ -36,7 +36,8 @@ class User(base.TelegramObject):
@property @property
def mention(self): def mention(self):
""" """
You can get mention to user (If user have username, otherwise return full name) You can get user's username to mention him
Full name will be returned if user has no username
:return: str :return: str
""" """
@ -47,7 +48,7 @@ class User(base.TelegramObject):
@property @property
def locale(self) -> 'babel.core.Locale' or None: def locale(self) -> 'babel.core.Locale' or None:
""" """
This property require `Babel <https://pypi.python.org/pypi/Babel>`_ module This property requires `Babel <https://pypi.python.org/pypi/Babel>`_ module
:return: :class:`babel.core.Locale` :return: :class:`babel.core.Locale`
:raise: ImportError: when babel is not installed. :raise: ImportError: when babel is not installed.
@ -79,9 +80,9 @@ class User(base.TelegramObject):
def __hash__(self): def __hash__(self):
return self.id + \ return self.id + \
hash(self.is_bot) + \ hash(self.is_bot) + \
hash(self.full_name) + \ hash(self.full_name) + \
(hash(self.username) if self.username else 0) (hash(self.username) if self.username else 0)
def __int__(self): def __int__(self):
return self.id return self.id