We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efa9030 commit 625f0e9Copy full SHA for 625f0e9
src/cattrs/v/__init__.py
@@ -1,5 +1,7 @@
1
"""Cattrs validation."""
2
-from typing import Callable, List, Union
+from typing import Any, Callable, List, Union
3
+
4
+from attrs import frozen
5
6
from .._compat import ExceptionGroup
7
from ..errors import (
@@ -31,6 +33,13 @@
31
33
]
32
34
35
36
+@frozen
37
+class VAnnotation:
38
+ """Use this with Annotated to get validation."""
39
40
+ validators: tuple[Callable[[Any], Any]]
41
42
43
def format_exception(exc: BaseException, type: Union[type, None]) -> str:
44
"""The default exception formatter, handling the most common exceptions.
45
0 commit comments