diff --git a/zon/__init__.py b/zon/__init__.py index 7206c61..14eaa35 100644 --- a/zon/__init__.py +++ b/zon/__init__.py @@ -18,6 +18,8 @@ from zon.str import ZonString from zon.union import ZonUnion from zon.record import ZonRecord +from zon.any import ZonAny +from zon.none import ZonNone def string() -> "ZonString": @@ -92,3 +94,19 @@ def record(properties: dict[str, "Zon"]) -> "ZonRecord": an object with the specified properties. """ return ZonRecord(properties) + +def none() -> "ZonNone": + """Creates a new Zon that validates that the data is None. + + Returns: + ZonNone: a new validator that validates that the data is None. + """ + return ZonNone() + +def anything() -> "ZonAny": + """Creates a new Zon that validates anything. + + Returns: + ZonAny: a new validator that validates anything. + """ + return ZonAny() \ No newline at end of file diff --git a/zon/any.py b/zon/any.py index 9d13d32..371b122 100644 --- a/zon/any.py +++ b/zon/any.py @@ -3,7 +3,7 @@ from .base import Zon -class ZonNone(Zon): +class ZonAny(Zon): """A Zon that validates that the data is any data type.""" def _setup(self) -> None: