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

Method check

Solutions/6_5/validate.py:34–37  ·  view source on GitHub ↗
(cls, value)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

checkMethod · 0.45

Tested by

no test coverage detected