Skip to content

ast docs: Fix incorrect link on keyword #108728

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

Merged
merged 1 commit into from
Aug 31, 2023
Merged

Conversation

alexpovel
Copy link
Contributor

@alexpovel alexpovel commented Aug 31, 2023

'Grammar-level keyword' != 'Function signature keyword argument'

From https://devguide.python.org/documentation/markup/#roles :

Normally, names in these roles are searched first without any further
qualification, then with the current module name prepended, then with
the current module and class name (if any) prepended. If you prefix
the name with a dot, this order is reversed.

So the global keyword module was found first; fix by forcing local search.

Check current docs, where keyword contains the wrong link.


📚 Documentation preview 📚: https://cpython-previews--108728.org.readthedocs.build/

'Grammar-level *keyword*' != 'Function signature *keyword* argument'

From https://devguide.python.org/documentation/markup/#roles :

> Normally, names in these roles are searched first without any further
> qualification, then with the current module name prepended, then with
> the current module and class name (if any) prepended. If you prefix
> the name with a dot, this order is reversed.

So the global `keyword` module was found first; fix by forcing local
search.
@ghost
Copy link

ghost commented Aug 31, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot bedevere-bot added docs Documentation in the Doc dir skip news awaiting review labels Aug 31, 2023
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Thanks!

@AlexWaygood AlexWaygood changed the title fix: ast.keyword linked to Lib/keyword module ast docs: Fix incorrect link on keyword Aug 31, 2023
@AlexWaygood AlexWaygood added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Aug 31, 2023
@AlexWaygood AlexWaygood merged commit c1e2f3b into python:main Aug 31, 2023
@miss-islington
Copy link
Contributor

Thanks @alexpovel for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-108737 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Aug 31, 2023
@bedevere-bot
Copy link

GH-108738 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Aug 31, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 31, 2023
In two places, Sphinx was erroneously adding links to the `keyword` module instead of the `ast.keyword` class
(cherry picked from commit c1e2f3b)

Co-authored-by: Alex Povel <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 31, 2023
In two places, Sphinx was erroneously adding links to the `keyword` module instead of the `ast.keyword` class
(cherry picked from commit c1e2f3b)

Co-authored-by: Alex Povel <[email protected]>
AlexWaygood pushed a commit that referenced this pull request Aug 31, 2023
`ast` docs: Fix incorrect link on `keyword` (GH-108728)

In two places, Sphinx was erroneously adding links to the `keyword` module instead of the `ast.keyword` class
(cherry picked from commit c1e2f3b)

Co-authored-by: Alex Povel <[email protected]>
Yhg1s pushed a commit that referenced this pull request Sep 1, 2023
`ast` docs: Fix incorrect link on `keyword` (GH-108728)

In two places, Sphinx was erroneously adding links to the `keyword` module instead of the `ast.keyword` class
(cherry picked from commit c1e2f3b)

Co-authored-by: Alex Povel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants