(value: str, *styles: str)
| 484 | |
| 485 | |
| 486 | def _ansi_style(value: str, *styles: str) -> str: |
| 487 | if not _log_add_style: |
| 488 | return value |
| 489 | |
| 490 | codes = { |
| 491 | "bold": 1, |
| 492 | "red": 31, |
| 493 | "green": 32, |
| 494 | "yellow": 33, |
| 495 | "magenta": 35, |
| 496 | "cyan": 36, |
| 497 | } |
| 498 | |
| 499 | for style in styles: |
| 500 | value = f"\x1b[{codes[style]}m{value}" |
| 501 | |
| 502 | return f"{value}\x1b[0m" |
| 503 | |
| 504 | |
| 505 | def generate_adhoc_ssl_pair( |
no outgoing calls
no test coverage detected