You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NoAny: disallow Any in the passed in type. Could be either "shallow" (disallow only Any itself, and VariableNameValue) or "deep" (recurse into the Value with .walk_values() and error if there's Any anywhere).
RestrictedLiteral: like LiteralOnly, but adds a callback function that can reject a value. For example, Spark jobs can take a string representing how much memory they accept in the form 123g. The callback could check that the passed in value is a string consisting of a number plus g. We could allow the function to return a bool, a str (error message) or an ErrorMessage object.
The text was updated successfully, but these errors were encountered:
We could also provide a JSONCompatible check that recurses into values and checks they are JSON-compatible (float, int, null, string, bool, lists or dicts of other JSON-compatible things).
Ideas:
NoAny
: disallowAny
in the passed in type. Could be either "shallow" (disallow only Any itself, and VariableNameValue) or "deep" (recurse into the Value with.walk_values()
and error if there's Any anywhere).RestrictedLiteral
: likeLiteralOnly
, but adds a callback function that can reject a value. For example, Spark jobs can take a string representing how much memory they accept in the form123g
. The callback could check that the passed in value is a string consisting of a number plusg
. We could allow the function to return a bool, a str (error message) or anErrorMessage
object.The text was updated successfully, but these errors were encountered: