(self, file: TextIO | None = None)
| 73 | ) |
| 74 | |
| 75 | def __init__(self, file: TextIO | None = None) -> None: |
| 76 | if file is None: |
| 77 | file = sys.stdout |
| 78 | if hasattr(file, "isatty") and file.isatty() and sys.platform == "win32": |
| 79 | try: |
| 80 | import colorama |
| 81 | except ImportError: |
| 82 | pass |
| 83 | else: |
| 84 | file = colorama.AnsiToWin32(file).stream |
| 85 | assert file is not None |
| 86 | self._file = file |
| 87 | self.hasmarkup = should_do_markup(file) |
| 88 | self._current_line = "" |
| 89 | self._terminal_width: int | None = None |
| 90 | self.code_highlight = True |
| 91 | |
| 92 | @property |
| 93 | def fullwidth(self) -> int: |
nothing calls this directly
no test coverage detected