-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
gh-142197: Doc: Add missing import statement in importlib.metadata overview #142208
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
base: main
Are you sure you want to change the base?
Conversation
StanFromIreland
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.
Please revert unrelated changes in different files.
|
|
||
| You can get the :ref:`metadata for a distribution <metadata>`:: | ||
|
|
||
| >>> list(metadata('wheel')) # doctest: +SKIP |
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.
Why are you changing the indentation?
| You can get the :ref:`metadata for a distribution <metadata>`:: | ||
|
|
||
| >>> from importlib.metadata import metadata # doctest: +SKIP |
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 leave a blank line before >>>
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Co-authored-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
|
I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @picnixz: please review the changes made to this pull request. |
|
@picnixz , just checking in, could you review my PR and let me know if there's anything more to fix? |
Fixes #142197
Added missing
from importlib.metadata import metadataimport statement before the example code that usesmetadata('wheel')in the overview section.The documentation showed usage of the
metadata()function without first importing it, causing aNameErrorwhen users tried to follow the example. This change ensures the example code is runnable as-is.📚 Documentation preview 📚: https://cpython-previews--142208.org.readthedocs.build/