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

Method check

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

Source from the content-addressed store, hash-verified

34class Positive(Validator):
35 @classmethod
36 def check(cls, value):
37 if value < 0:
38 raise ValueError('must be >= 0')
39 return super().check(value)
40
41class NonEmpty(Validator):
42 @classmethod

Callers

nothing calls this directly

Calls 1

checkMethod · 0.45

Tested by

no test coverage detected