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

Method check

Solutions/8_3/validate.py:48–51  ·  view source on GitHub ↗
(cls, value)

Source from the content-addressed store, hash-verified

46class NonEmpty(Validator):
47 @classmethod
48 def check(cls, value):
49 if len(value) == 0:
50 raise ValueError('must be non-empty')
51 return super().check(value)
52
53class PositiveInteger(Integer, Positive):
54 pass

Callers

nothing calls this directly

Calls 1

checkMethod · 0.45

Tested by

no test coverage detected