MCPcopy
hub / github.com/pallets/werkzeug / _ansi_style

Function _ansi_style

src/werkzeug/serving.py:486–502  ·  view source on GitHub ↗
(value: str, *styles: str)

Source from the content-addressed store, hash-verified

484
485
486def _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
505def generate_adhoc_ssl_pair(

Callers 3

log_requestMethod · 0.85
log_startupMethod · 0.85
run_simpleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected