From 31ddad6c243f419d0fa007c99405e9740c75e186 Mon Sep 17 00:00:00 2001 From: Kenny2github Date: Mon, 30 Aug 2021 02:37:21 -0400 Subject: [PATCH] Don't include :class: in README --- README.rst | 4 ++-- setup.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index e18ec88..7b3107b 100644 --- a/README.rst +++ b/README.rst @@ -41,8 +41,8 @@ Example Usage Notes ~~~~~ -* :class:`~discord.ext.slash.Context` emulates - :class:`discord.ext.commands.Context`, but only to a certain extent. +* ``discord.ext.slash.Context`` emulates + ``discord.ext.commands.Context``, but only to a certain extent. Notably, ``ctx.message`` does not exist, because slash commands can be run completely without the involvement of messages. However, channel and author information is still available. diff --git a/setup.py b/setup.py index 15179e9..5328687 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -from re import match, S +from re import match, S, sub import os from setuptools import setup @@ -9,6 +9,7 @@ longdesc = match('^([\'"])\\1{2}(.*?)\\1{3}', contents, S).group(2) version = match(r'[\s\S]*__version__[^\'"]+[\'"]([^\'"]+)[\'"]', contents).group(1) del contents +longdesc = sub(':class:`~?([^`]+)`', r'``\1``', longdesc) with open(os.path.join(os.path.dirname(__file__), 'README.rst'), 'w') as f2: