-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix intersphinx reftitle for non-numeric versions #13737
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 intersphinx reftitle for non-numeric versions #13737
Conversation
This commit removes 'v' prefix from non-numeric versions in reftitles in intersphinx. Appending it resulted in strange version names like "vstable" instead of just "stable" Signed-off-by: Szymon Karpiński <[email protected]>
Signed-off-by: Szymon Karpiński <[email protected]>
sphinx/ext/intersphinx/_resolve.py
Outdated
| version = 'v%s' % inv_item.project_version | ||
| reftitle = _('(in %s %s)') % (inv_item.project_name, version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can you use an f-string here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to f-string for version = .... For reftitle = ... I can't use an f-string, because as far as I understand _(...) needs to work on a yet unformatted string.
Signed-off-by: Szymon Karpiński <[email protected]>
AA-Turner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Please add yourself to AUTHORS and add a brief CHANGES entry.
A
|
Congratulations on your first contribution @szkarpinski! A |
Purpose
This PR removes 'v' prefix from non-numeric versions in reftitles in intersphinx. Appending it resulted in strange version names like "vstable" instead of just "stable".
References