Skip to content

Comments

WIP: Docs: use a Sphinx extension to eliminate excessive links#145130

Open
nedbat wants to merge 1 commit intopython:mainfrom
nedbat:nedbat/no-duplicate-links
Open

WIP: Docs: use a Sphinx extension to eliminate excessive links#145130
nedbat wants to merge 1 commit intopython:mainfrom
nedbat:nedbat/no-duplicate-links

Conversation

@nedbat
Copy link
Member

@nedbat nedbat commented Feb 22, 2026

@nedbat
Copy link
Member Author

nedbat commented Feb 22, 2026

I had a good idea: instead of writing a linter to change .rst files (pinging everyone, expecting reviews, hardcoding what's excessive, etc), now we have a Sphinx extension that does it all on the fly during the build.

@nedbat
Copy link
Member Author

nedbat commented Feb 22, 2026

Of course: if we like this, I'll publish linklint for real.

@nedbat
Copy link
Member Author

nedbat commented Feb 23, 2026

Some methods aren't unlinking properly, like ZipFile.close, but I think that's because the .rst is wrong: the methods aren't indented under the class. Is that a mistake in the .rst? Sphinx understands that "close" is "ZipFile.close", or is that because the .rst has .. method: ZipFile.close() ?

@nedbat
Copy link
Member Author

nedbat commented Feb 23, 2026

I see many classes document their methods that way, so there's more work to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant