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