Skip to content
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

✏️ Fix Pydantic examples in tutorial for Python types #9961

Merged
merged 2 commits into from
Sep 2, 2023

Conversation

rahulsalgare
Copy link
Contributor

pydantic script was getting an error,
"pydantic.errors.PydanticUserError: A non-annotated attribute was detected: name = 'John Doe'. All model fields require a type annotation; if name is not meant to be a field, you may be able to resolve this error by annotating it as a ClassVar or updating model_config['ignored_types']."
fixed by adding type annotation str

@tiangolo
Copy link
Owner

📝 Docs preview for commit c17154e at: https://64c3e594a5096d0ff5f67c83--fastapi.netlify.app

@tiangolo tiangolo changed the title non-annotated attribute fixed in python types intro doc ✏️ Fix Pydantic examples in tutorial for Python types Sep 2, 2023
@tiangolo
Copy link
Owner

tiangolo commented Sep 2, 2023

Good catch, thank you @rahulsalgare! 🙇 🚀

@tiangolo tiangolo enabled auto-merge (squash) September 2, 2023 15:35
@tiangolo tiangolo merged commit 0242ca7 into tiangolo:master Sep 2, 2023
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants