Skip to content

Lint: Allow per-message Post-History links w/trailing slash - #3005

Merged
CAM-Gerlach merged 5 commits into
python:mainfrom
CAM-Gerlach:lint-fix-post-history-regression
Feb 6, 2023
Merged

CAM-Gerlach merged 5 commits into
python:mainfrom
CAM-Gerlach:lint-fix-post-history-regression

Conversation

@CAM-Gerlach

Copy link
Copy Markdown
Member

In PR #3004 , a regression was introduced in the linter, bypassing the check that Discourse links are to the thread rather than to an individual message (as the modern link form of Post-History is for keeping a history of the Discussions-To threads, rather than links to individual messages about the PEP, which can go in the PEP body if desired).

This is also a pretty easy mistake to make by accident, as if you've scrolled past the first message, the message number will be appended to the URL, leaving readers unintentionally stuck in the middle of the thread rather than at the start (which also messes with Discourse's bookmarking of where you left off reading a thread).

Finally, as the headers are intended to be structured data in an easily-machine-parsable format, consumed by a number of tools in this repo and many more through the PEP API, including PEP-o-tron, the Python Discord bot, and others, it's best if they are as consistent as possible.

@CAM-Gerlach CAM-Gerlach added the lint Linter-related work and linting fixes on PEPs label Feb 4, 2023
@CAM-Gerlach CAM-Gerlach self-assigned this Feb 4, 2023
@CAM-Gerlach CAM-Gerlach mentioned this pull request Feb 4, 2023
3 of 4 tasks
Comment thread pep-0684.rst
@CAM-Gerlach

Copy link
Copy Markdown
Member Author

Also, to reduce any reader confusion about what each link points to, I modified the the link type shown in the tooltip when hovering over links to individual messages to say Discourse message as opposed to "Discourse post`` (which could be confused with the post of a new thread).

image

image

@ericsnowcurrently ericsnowcurrently left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Thanks for doing this!

@CAM-Gerlach

Copy link
Copy Markdown
Member Author

Thanks for your great feedback @ericsnowcurrently !

@CAM-Gerlach CAM-Gerlach changed the title Lint: Fix regression in Post-History not flagging non-thread links Lint: Allow per-message Post-History links w/trailing slash Feb 6, 2023
@CAM-Gerlach
CAM-Gerlach merged commit f292166 into python:main Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lint Linter-related work and linting fixes on PEPs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants