Skip to content

Commit a44e9f0

Browse files
authored
Update documentation following Colorama removal (#3671)
2 parents 94c191c + 13f075c commit a44e9f0

3 files changed

Lines changed: 5 additions & 10 deletions

File tree

docs/utils.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,9 @@ click.echo('Hello World!', err=True)
5252
```{versionadded} 2.0
5353
```
5454

55-
The {func}`echo` function supports ANSI colors and styles.
56-
57-
Primarily this means that:
58-
59-
- Click's {func}`echo` function will automatically strip ANSI color codes if the stream is not connected to a terminal.
60-
- the {func}`echo` function will transparently connect to the terminal on Windows and translate ANSI codes to terminal
61-
API calls. This means that colors will work on Windows the same way they do on other operating systems.
55+
The {func}`echo` function supports ANSI colors and styles. It will
56+
automatically strip ANSI color codes if the stream is not connected to a
57+
terminal.
6258

6359
:::{admonition} Older Windows Support
6460
:class: note

src/click/termui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ def hidden_prompt_func(prompt: str) -> str:
8282

8383

8484
def _readline_prompt(func: t.Callable[[str], str], text: str, err: bool) -> str:
85-
"""Call a prompt function, passing the full prompt on non-Windows so
86-
readline can handle line editing and cursor positioning correctly.
85+
"""Call a prompt function, passing the full prompt so readline can
86+
handle line editing and cursor positioning correctly.
8787
8888
The prompt is handed to *func* (such as :func:`input`) rather than
8989
written through :func:`echo`, so it has to strip ANSI color and style

src/click/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ def echo(
259259
- Supports Unicode in the Windows console.
260260
- Supports writing to binary outputs, and supports writing bytes
261261
to text outputs.
262-
- Supports colors and styles on Windows.
263262
- Removes ANSI color and style codes if the output does not look
264263
like an interactive terminal.
265264
- Always flushes the output.

0 commit comments

Comments
 (0)