Skip to content

Commit

Permalink
Update define relationships attributes docs: Optional[Team] -> `Tea…
Browse files Browse the repository at this point in the history
…m | None`
  • Loading branch information
dsku committed Aug 13, 2024
1 parent 91a7188 commit e4eebb0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ if hero.team:

## Optional Relationship Attributes

Notice that in the `Hero` class, the type annotation for `team` is `Optional[Team]`.
Notice that in the `Hero` class, the type annotation for `team` is `Team | None` (which is equivalent to `Optional[Team]` in both Python 3.7+ and 3.9+).

This means that this attribute could be `None`, or it could be a full `Team` object.

Expand Down

0 comments on commit e4eebb0

Please sign in to comment.