(self, fmt_str)
| 328 | f"symbol='{self.symbol}')") |
| 329 | |
| 330 | def __format__(self, fmt_str): |
| 331 | if fmt_str == '': |
| 332 | return self.__str__() |
| 333 | if fmt_str not in ('ascii', 'unicode'): |
| 334 | raise ValueError( |
| 335 | f"Unsupported format string '{fmt_str}' passed to " |
| 336 | f"{self.__class__}.__format__. Valid options are " |
| 337 | f"'ascii' and 'unicode'" |
| 338 | ) |
| 339 | if fmt_str == 'ascii': |
| 340 | return self._generate_string(self._str_term_ascii) |
| 341 | return self._generate_string(self._str_term_unicode) |
| 342 | |
| 343 | def __str__(self): |
| 344 | if self._use_unicode: |
nothing calls this directly
no test coverage detected