Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
tiangolo merged 2 commits into
fastapi:masterfrom
rahulsalgare:master
Sep 2, 2023
Merged

✏️ Fix Pydantic examples in tutorial for Python types#9961
tiangolo merged 2 commits into
fastapi:masterfrom
rahulsalgare:master

Conversation

@rahulsalgare

Copy link
Copy Markdown
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
Copy Markdown
Member

📝 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

tiangolo commented Sep 2, 2023

Copy link
Copy Markdown
Member

Good catch, thank you @rahulsalgare! 🙇 🚀

@tiangolo tiangolo enabled auto-merge (squash) September 2, 2023 15:35
@tiangolo tiangolo merged commit 0242ca7 into fastapi:master Sep 2, 2023
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.

3 participants