MCPcopy Create free account
hub / github.com/rthalley/dnspython / _check_value

Method _check_value

dns/enum.py:34–40  ·  view source on GitHub ↗
(cls, value)

Source from the content-addressed store, hash-verified

32
33 @classmethod
34 def _check_value(cls, value):
35 max = cls._maximum()
36 if not isinstance(value, int):
37 raise TypeError
38 if value < 0 or value > max:
39 name = cls._short_name()
40 raise ValueError(f"{name} must be an int between >= 0 and <= {max}")
41
42 @classmethod
43 def from_text(cls: Type[TIntEnum], text: str) -> TIntEnum:

Callers 4

_missing_Method · 0.80
from_textMethod · 0.80
to_textMethod · 0.80
makeMethod · 0.80

Calls 2

_maximumMethod · 0.45
_short_nameMethod · 0.45

Tested by

no test coverage detected