(self, val)
| 1133 | return int(i), int(f.ljust(6, "0")[:6]) |
| 1134 | |
| 1135 | def _to_decimal(self, val): |
| 1136 | try: |
| 1137 | decimal_value = Decimal(val) |
| 1138 | # See GH 662, edge case, infinite value should not be converted |
| 1139 | # via `_to_decimal` |
| 1140 | if not decimal_value.is_finite(): |
| 1141 | raise ValueError("Converted decimal value is infinite or NaN") |
| 1142 | except Exception as e: |
| 1143 | msg = "Could not convert %s to decimal" % val |
| 1144 | raise ValueError(msg) from e |
| 1145 | else: |
| 1146 | return decimal_value |
| 1147 | |
| 1148 | # ------------------------------------------------------------------ |
| 1149 | # Post-Parsing construction of datetime output. These are kept as |
no outgoing calls
no test coverage detected