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

Method check

Solutions/4_2/validate.py:32–35  ·  view source on GitHub ↗
(cls, value)

Source from the content-addressed store, hash-verified

30class NonEmpty(Validator):
31 @classmethod
32 def check(cls, value):
33 if len(value) == 0:
34 raise ValueError('Must be non-empty')
35 return super().check(value)
36
37class PositiveInteger(Integer, Positive):
38 pass

Callers

nothing calls this directly

Calls 1

checkMethod · 0.45

Tested by

no test coverage detected