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

Method check

Solutions/7_2/validate.py:43–46  ·  view source on GitHub ↗
(cls, value)

Source from the content-addressed store, hash-verified

41class NonEmpty(Validator):
42 @classmethod
43 def check(cls, value):
44 if len(value) == 0:
45 raise ValueError('must be non-empty')
46 return super().check(value)
47
48class PositiveInteger(Integer, Positive):
49 pass

Callers

nothing calls this directly

Calls 1

checkMethod · 0.45

Tested by

no test coverage detected