diff options
author | 2022-09-18 15:36:42 -0400 | |
---|---|---|
committer | 2022-09-18 19:36:42 +0000 | |
commit | f65b49497fb402a732b6d723b5f2c1f8fd2f983a (patch) | |
tree | e6a85e1b7efa44771edd38a6ad79fd05b175d0c0 | |
parent | Merge pull request #2265 from JuaniBattiston/remove-unnecessary-login (diff) |
Moved `escape_markdown` after Truthy check (#2279)
-rw-r--r-- | bot/exts/info/pypi.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/exts/info/pypi.py b/bot/exts/info/pypi.py index 2d387df3d..bac7d2389 100644 --- a/bot/exts/info/pypi.py +++ b/bot/exts/info/pypi.py @@ -54,11 +54,12 @@ class PyPi(Cog): embed.url = info["package_url"] embed.colour = next(PYPI_COLOURS) - summary = escape_markdown(info["summary"]) + # Summary can be None if not provided by the package + summary: str | None = info["summary"] # Summary could be completely empty, or just whitespace. if summary and not summary.isspace(): - embed.description = summary + embed.description = escape_markdown(summary) else: embed.description = "No summary provided." |