mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 20:35:00 +00:00

# 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`.
25 lines
678 B
Python
25 lines
678 B
Python
from setuptools import find_packages, setup
|
|
|
|
with open("requirements.txt") as f:
|
|
requirements = f.read().splitlines()
|
|
|
|
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.2",
|
|
packages=find_packages(),
|
|
install_requires=requirements,
|
|
entry_points={
|
|
"console_scripts": [
|
|
"aider = aider.main:main",
|
|
],
|
|
},
|
|
long_description=long_description,
|
|
long_description_content_type="text/markdown",
|
|
)
|