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

Method check

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

Source from the content-addressed store, hash-verified

23class Positive(Validator):
24 @classmethod
25 def check(cls, value):
26 if value < 0:
27 raise ValueError('Must be >= 0')
28 return super().check(value)
29
30class NonEmpty(Validator):
31 @classmethod

Callers

nothing calls this directly

Calls 1

checkMethod · 0.45

Tested by

no test coverage detected