Skip to content

Update index.md in docs to import required things in code example#10229

Merged
Viicos merged 1 commit intopydantic:mainfrom
insumanth:patch-1
Aug 25, 2024
Merged

Update index.md in docs to import required things in code example#10229
Viicos merged 1 commit intopydantic:mainfrom
insumanth:patch-1

Conversation

@insumanth
Copy link
Copy Markdown
Contributor

@insumanth insumanth commented Aug 25, 2024

Imported

  1. datetime from datetime
  2. PositiveInt and BaseModel from pydantic

Change Summary

Through it seems as this is not required as people will know it when reading docs, Pydantic docs provides option to run examples which will result in error instead of the required behavior that the docs is trying to convey.

Error without correct imports Correctly conveying what docs is trying to show
image image

Related issue number

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @sydney-runkle

Imported 
1. `datetime` from `datetime`
2. `PositiveInt` and `BaseModel` from `pydantic`

Through it seems as this is not required as people will know it, 
Pydantic docs provides option to run examples which will result in error instead of the required behavior that the docs is trying to convey.
@github-actions github-actions Bot added the relnotes-fix Used for bugfixes. label Aug 25, 2024
@insumanth
Copy link
Copy Markdown
Contributor Author

please review

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Aug 25, 2024

CodSpeed Performance Report

Merging #10229 will not alter performance

Comparing insumanth:patch-1 (7b5602b) with main (0672da1)

Summary

✅ 17 untouched benchmarks

@github-actions
Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@Viicos
Copy link
Copy Markdown
Member

Viicos commented Aug 25, 2024

Thanks for the contribution.

@Viicos Viicos enabled auto-merge (squash) August 25, 2024 17:50
@Viicos Viicos merged commit 4a70cec into pydantic:main Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants