(
colorize: bool = False, *, file: IO[str] | IO[bytes] | None = None
)
| 256 | |
| 257 | |
| 258 | def get_colors( |
| 259 | colorize: bool = False, *, file: IO[str] | IO[bytes] | None = None |
| 260 | ) -> ANSIColors: |
| 261 | if colorize or can_colorize(file=file): |
| 262 | return ANSIColors() |
| 263 | else: |
| 264 | return NoColors |
| 265 | |
| 266 | |
| 267 | def decolor(text: str) -> str: |
no test coverage detected