gh-142197: Doc: Add missing import statement in importlib.metadata overview#142208
gh-142197: Doc: Add missing import statement in importlib.metadata overview#142208Yashp002 wants to merge 5 commits intopython:mainfrom
Conversation
StanFromIreland
left a comment
There was a problem hiding this comment.
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.
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.
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/