diff options
| author | 2020-07-24 17:42:42 +0800 | |
|---|---|---|
| committer | 2020-07-24 17:42:42 +0800 | |
| commit | 6bab215b45b5ad2d40b68459a70e7731af2eb7a2 (patch) | |
| tree | 9a04a2dba182299e5dd8414a3f763f6e45f585e0 | |
| parent | Merge pull request #1064 from python-discord/bug/1036/empty-embed-fields (diff) | |
Fix: Implicit string concatenation considered harmful
Python joins two string adjacent string literals implicitly, which may
cause unintended side effects when used with certain string methods.
>>> 'A' ' '.join(['1', '2', '3'])
'1A 2A 3'
| -rw-r--r-- | bot/cogs/information.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/bot/cogs/information.py b/bot/cogs/information.py index d6090d481..8982196d1 100644 --- a/bot/cogs/information.py +++ b/bot/cogs/information.py @@ -116,10 +116,7 @@ class Information(Cog): parsed_roles.append(role) if failed_roles: - await ctx.send( - ":x: I could not convert the following role names to a role: \n- " - "\n- ".join(failed_roles) - ) + await ctx.send(f":x: Could not retrieve the following roles: {', '.join(failed_roles)}") for role in parsed_roles: h, s, v = colorsys.rgb_to_hsv(*role.colour.to_rgb()) |