Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of continuation lines in Description metadata field #1220

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dnicolodi
Copy link
Contributor

Fixes #1218.

@dnicolodi dnicolodi force-pushed the fix-description-continuation branch 2 times, most recently from a80bd00 to ecf7e91 Compare January 23, 2025 14:48
Comment on lines +81 to +82
or all(line.startswith(" |") for line in lines[1:])
or all(line.startswith(" ") for line in lines[1:])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
or all(line.startswith(" |") for line in lines[1:])
or all(line.startswith(" ") for line in lines[1:])
or all(line.startswith((" |", " ")) for line in lines[1:])

Copy link
Contributor Author

@dnicolodi dnicolodi Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would implement a different check. The code as written tests whether all the line start with 8 spacer or all the lines start with 7 spaced and a pipe. The proposed code tests whether all the lines start with either 8 spaces or 7 spaces and a pipe. I don't think we should treat intermixed continuation style as valid. There is a test that ensures that someone else is not tempted into the same erroneous simplification.

@dnicolodi
Copy link
Contributor Author

Anyone?

@dnicolodi dnicolodi force-pushed the fix-description-continuation branch from ecf7e91 to 0c505c7 Compare March 10, 2025 09:37
@dnicolodi
Copy link
Contributor Author

Can anyone have a look at this? It is my understanding that this solves a problem encountered by projects using old setuptools.

@woodruffw
Copy link
Member

Can anyone have a look at this? It is my understanding that this solves a problem encountered by projects using old setuptools.

I'll take a look at it in the coming days; the current setuptools adoption curve looks pretty good in terms of people probably not encountering this very often, so IMO it's a relatively low-priority issue.

Stats here: https://clickpy.clickhouse.com/dashboard/setuptools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

text/x-rst README analysis broken with the latest version (6.1.0)
3 participants