[Docs] Fix ModuleNotFoundError in Pydantic Extra Types #9433
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Summary
The Pydantic Extra Types docs have several examples to run in the browser but
ModuleNotFoundError: No module named 'pydantic_extra_types'
error is raised becausepydantic-extra-types
is not installed. An example withLatitude
: https://docs.pydantic.dev/latest/api/pydantic_extra_types_coordinate/#pydantic_extra_types.coordinate.Latitude.I have updated
add_mkdocs_run_deps
to include this dependency with its version. Documentation is built and served correctly. I have verified theLatitude
example (and others) and its docstring runs as expected.For the sake of consistency on the output, the corresponding script is updated as well at samuelcolvin/mkdocs-run-code#6.
Checklist