MCPcopy Create free account
hub / github.com/apache/fory / _decimal_shape_fits

Function _decimal_shape_fits

python/pyfory/converter.py:149–152  ·  view source on GitHub ↗
(significant_digits: int, scale: int)

Source from the content-addressed store, hash-verified

147
148
149def _decimal_shape_fits(significant_digits: int, scale: int) -> bool:
150 if scale > _MAX_COMPATIBLE_DECIMAL_DIGITS:
151 return False
152 return scale >= 0 or significant_digits + (-scale) <= _MAX_COMPATIBLE_DECIMAL_DIGITS
153
154
155def _is_digit(value: str) -> bool:

Callers 1

_numeric_literal_fitsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected