From 9d39b135f4f84239787b0901d06a4f370a82d4bb Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 4 Apr 2021 04:40:19 -0400 Subject: Modernize code to use f-strings This also removes the encoding on the top, since Python 3 does it by default. It also changes some methods to use `yield from`. --- discord/role.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'discord/role.py') diff --git a/discord/role.py b/discord/role.py index 735ad12b..46f1ba39 100644 --- a/discord/role.py +++ b/discord/role.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - """ The MIT License (MIT) @@ -248,7 +246,7 @@ class Role(Hashable): @property def mention(self): """:class:`str`: Returns a string that allows you to mention a role.""" - return '<@&%s>' % self.id + return f'<@&{self.id}>' @property def members(self): -- cgit v1.2.3