(force_off: bool)
| 69 | |
| 70 | |
| 71 | def _use_color(force_off: bool) -> bool: |
| 72 | if force_off: |
| 73 | return False |
| 74 | if os.environ.get("NO_COLOR", ""): |
| 75 | return False |
| 76 | if not sys.stdout.isatty(): |
| 77 | return False |
| 78 | return True |
| 79 | |
| 80 | |
| 81 | def _build_style(use_color: bool) -> Style: |