MCPcopy Create free account
hub / github.com/ceph/ceph / verify_numeric

Function verify_numeric

src/python-common/ceph/deployment/utils.py:126–129  ·  view source on GitHub ↗
(field: Any, field_name: str)

Source from the content-addressed store, hash-verified

124
125
126def verify_numeric(field: Any, field_name: str) -> None:
127 if field is not None:
128 if not isinstance(field, Number) or isinstance(field, bool):
129 raise SpecValidationError(f"{field_name} must be a number")
130
131
132def verify_int(field: Any, field_name: str) -> None:

Callers 3

verify_intFunction · 0.85
verify_non_negative_intFunction · 0.85

Calls 1

SpecValidationErrorClass · 0.90

Tested by

no test coverage detected