aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/info/pypi.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/info/pypi.py')
-rw-r--r--bot/exts/info/pypi.py5
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."