Skip to content

Commit

Permalink
Update docs/api.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek authored Jul 17, 2024
1 parent a0b6b24 commit 93c1f07
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,9 @@ All objects from ``attrs.validators`` are also available from ``attr.validators`

.. doctest::

>>> from typing import List, Union
>>> @define
... class C:
... val: Union[int, List[int]] = field(
... val: int | list[int] = field(
... validator=attrs.validators.or_(
... attrs.validators.instance_of(int),
... attrs.validators.deep_iterable(attrs.validators.instance_of(int)),
Expand Down

0 comments on commit 93c1f07

Please sign in to comment.