(self, value)
| 220 | return textwrap.wrap(line, width) |
| 221 | |
| 222 | def intcomma(self, value): |
| 223 | sep = "," |
| 224 | if not isinstance(value, str): |
| 225 | value = int(value) |
| 226 | |
| 227 | orig = str(value) |
| 228 | |
| 229 | new = re.sub(r"^(-?\d+)(\d{3})", rf"\g<1>{sep}\g<2>", orig) |
| 230 | if orig == new: |
| 231 | return new |
| 232 | else: |
| 233 | return self.intcomma(new) |
| 234 | |
| 235 | def output_fn(self, current_prefix, string): |
| 236 | return "%s%s" % (self.prefix_format(current_prefix), string) |
no outgoing calls
no test coverage detected