Skip to content

Commit 95cc6c7

Browse files
committed
Updated annotated resources docs
1 parent fcd86a5 commit 95cc6c7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/intro/annotated-resources.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ The annotated resource syntax offers many rich ways of representing your resourc
2121
class Book(odin.AnnotatedResource):
2222
title: str
2323
author: Author
24-
genre: Optional[str] = odin.Options(max_length=255)
25-
num_pages: int = odin.Options(min_value=1)
24+
genre: Annotated[str | None, odin.Options(max_length=255)]
25+
num_pages: Annotated[int, odin.Options(min_value=1)]
2626
2727
2828

0 commit comments

Comments
 (0)