Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ignore docs errors
  • Loading branch information
Viicos committed Jan 15, 2024
commit b0231e1fee0475d64d36ebdd193546136b23ec2c
5 changes: 2 additions & 3 deletions docs/errors/usage_errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ except PydanticUserError as exc_info:
Because type annotations are evaluated *after* assignments, you might get unexpected results when using a type annotation name
that clashes with one of your fields. We raise an error in the following case:

```py
```py test="skip"
from datetime import date

from pydantic import BaseModel, Field
Expand All @@ -1035,9 +1035,8 @@ class Model(BaseModel):

As a workaround, you can either use an alias or change your import:

```py
```py lint="skip"
import datetime

# Or `from datetime import date as _date`

from pydantic import BaseModel, Field
Expand Down