mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add type hints to url & get_mention in User (#679)
This commit is contained in:
parent
3ee28281c4
commit
adaa21c0cc
1 changed files with 2 additions and 2 deletions
|
|
@ -64,10 +64,10 @@ class User(base.TelegramObject):
|
|||
return getattr(self, '_locale')
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
def url(self) -> str:
|
||||
return f"tg://user?id={self.id}"
|
||||
|
||||
def get_mention(self, name=None, as_html=None):
|
||||
def get_mention(self, name: Optional[str] = None, as_html: Optional[bool] = None) -> str:
|
||||
if as_html is None and self.bot.parse_mode and self.bot.parse_mode.lower() == 'html':
|
||||
as_html = True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue