-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-84232: Fix pydoc docs.python.org link generation
#139995
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
Conversation
|
Requesting Serhiy per experts list. |
|
UBSan failure is unrelated. |
|
@picnixz Thanks for the helpful reviews on the (other) |
pydoc docs.python.org link generationpydoc docs.python.org link generation
| self.module_docs[module_name] = ( | ||
| doc_file + f"#module-{module_name}" | ||
| ) |
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.
| self.module_docs[module_name] = ( | |
| doc_file + f"#module-{module_name}" | |
| ) | |
| self.module_docs[module_name] = f"{doc_file}#module-{module_name}" |
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.
I have to revert this I'm afraid, ruff complains and I don't think it's worth adding the ignore.
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.
What is the complaint?
Don’t you find it unpleasant to mix string addition and f-string?
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.
Unfortunately pre-commit does not give much information:
Run Ruff (format) on Doc/................................................Failed
- hook id: ruff-format
- exit code: 1
Would reformat: Doc/tools/extensions/pydoc_topics.py
1 file would be reformatted, 13 files already formatted
If you feel strongly than I can apply the change and mark it as ignored?
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.
Let's remove --check from the Ruff formats in .pre-commit-config.yaml so it actually makes the change. It's not much help for it say it would make a change but keep it a secret :)
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.
To clarify, what is currently on this branch is what ruff formatted the line to.
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.
It's now like this, which looks good to me:
self.module_docs[module_name] = (
f"{doc_file}#module-{module_name}"
)|
I’m ready to review after conflicts are fixed to get this merged! |
|
I’m not adding the backport labels as the list of modules has differences between versions, and there is a manual step to generate the pydoc data file. |
Co-authored-by: Éric <merwok@netwok.org>
Yes and no, the script is run during the release process anyway, there is no additional work for RMs:-) |
|
Thanks @StanFromIreland for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Thanks @StanFromIreland for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Sorry, @StanFromIreland and @hugovk, I could not cleanly backport this to |
|
GH-143098 is a backport of this pull request to the 3.14 branch. |
|
GH-143099 is a backport of this pull request to the 3.13 branch. |
…ythonGH-139995) (cherry picked from commit f9704f1) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Co-authored-by: Éric <merwok@netwok.org>
pydocinncorrectly assumes a module has documentation and where #139971📚 Documentation preview 📚: https://cpython-previews--139995.org.readthedocs.build/