(value: decimal.Decimal)
| 290 | |
| 291 | |
| 292 | def _plain_decimal_text(value: decimal.Decimal) -> str: |
| 293 | value = _canonical_decimal(value) |
| 294 | if value.is_zero(): |
| 295 | return "0" |
| 296 | text = format(value, "f") |
| 297 | if "." in text: |
| 298 | text = text.rstrip("0").rstrip(".") |
| 299 | return text |
| 300 | |
| 301 | |
| 302 | def _float_text(value: float) -> str: |
no test coverage detected