MCPcopy Create free account
hub / github.com/dabeaz-course/python-mastery / check

Method check

Solutions/9_2/structly/validate.py:41–44  ·  view source on GitHub ↗
(cls, value)

Source from the content-addressed store, hash-verified

39class Positive(Validator):
40 @classmethod
41 def check(cls, value):
42 if value < 0:
43 raise ValueError('must be >= 0')
44 return super().check(value)
45
46class NonEmpty(Validator):
47 @classmethod

Callers

nothing calls this directly

Calls 1

checkMethod · 0.45

Tested by

no test coverage detected