From 1eb9ab1b7093c4cf974bb0837cbab1ac81d983c5 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 7 Jun 2023 17:11:16 -0700 Subject: [PATCH] aider: Added regex to remove lines containing bullets with anchor links from `long_description` in `setup.py`. # Context: USER: also filter out the bullets which are just #anchor links to elsewhere in the readme ASSISTANT: To filter out the bullets with anchor links in the `long_description` in `setup.py`, you can use a regular expression to remove the lines containing those links. Here's the change you need to make in `setup.py`: ```python setup.py <<<<<<< ORIGINAL import re with open("README.md", "r", encoding="utf-8") as f: long_description = f.read() long_description = re.sub(r'\n!\[.*\]\(.*\)', '', long_description) ======= import re with open("README.md", "r", encoding="utf-8") as f: long_description = f.read() long_description = re.sub(r'\n!\[.*\]\(.*\)', '', long_description) long_description = re.sub(r'\n- \[.*\]\(#.*\)', '', long_description) >>>>>>> UPDATED ``` This change adds another `re.sub()` function to remove lines containing bullets with anchor links from the `long_description`. --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f5a2ee534..7627e7c86 100644 --- a/setup.py +++ b/setup.py @@ -8,10 +8,11 @@ import re with open("README.md", "r", encoding="utf-8") as f: long_description = f.read() long_description = re.sub(r'\n!\[.*\]\(.*\)', '', long_description) + long_description = re.sub(r'\n- \[.*\]\(#.*\)', '', long_description) setup( name="aider-chat", - version="0.5.1", + version="0.5.2", packages=find_packages(), install_requires=requirements, entry_points={