Skip to content

Commit

Permalink
Update the right python doc link for typing.Annotated (#7830)
Browse files Browse the repository at this point in the history
  • Loading branch information
gowthamgts committed Oct 16, 2023
1 parent fc6ea76 commit e710a21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/why.md
Expand Up @@ -43,7 +43,7 @@ Using type hints also means that Pydantic integrates well with static typing too

1. The `name` field is simply annotated with `str` - any string is allowed.
2. The [`Literal`](https://docs.python.org/3/library/typing.html#typing.Literal) type is used to enforce that `color` is either `'red'` or `'green'`.
3. Even when we want to apply constraints not encapsulated in python types, we can use [`Annotated`](https://docs.python.org/3/library/typing.html#typing.Literal) and [`annotated-types`](https://github.com/annotated-types/annotated-types) to enforce constraints without breaking type hints.
3. Even when we want to apply constraints not encapsulated in python types, we can use [`Annotated`](https://docs.python.org/3/library/typing.html#typing.Annotated) and [`annotated-types`](https://github.com/annotated-types/annotated-types) to enforce constraints without breaking type hints.
4. I'm not claiming "bazam" is really an attribute of fruit, but rather to show that arbitrarily complex types can easily be validated.

!!! tip "Learn more"
Expand Down

0 comments on commit e710a21

Please sign in to comment.