Skip to content

Commit f09b3c2

Browse files
authored
Merge branch 'master' into remove-group-name-from-callback
2 parents 3e91df4 + 53e21fd commit f09b3c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+360
-1874
lines changed

docs/release-notes.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
## Latest Changes
44

5+
## 0.13.1
6+
7+
### Features
8+
9+
* ✨ Remove Rich tags when showing completion text. PR [#877](https://github.com/fastapi/typer/pull/877) by [@svlandeg](https://github.com/svlandeg).
10+
* ✨ Render Rich markup as HTML in Markdown docs. PR [#847](https://github.com/fastapi/typer/pull/847) by [@svlandeg](https://github.com/svlandeg).
11+
* ✨ Support cp850 encoding for auto-completion in PowerShell. PR [#808](https://github.com/fastapi/typer/pull/808) by [@svlandeg](https://github.com/svlandeg).
12+
* ✨ Allow gettext translation of help message. PR [#886](https://github.com/fastapi/typer/pull/886) by [@svlandeg](https://github.com/svlandeg).
13+
14+
### Refactors
15+
16+
* 🐛 Fix printing HTML from Rich output. PR [#1055](https://github.com/fastapi/typer/pull/1055) by [@tiangolo](https://github.com/tiangolo).
17+
18+
### Docs
19+
20+
* 📝 Update markdown includes to use the new simpler format. PR [#1054](https://github.com/fastapi/typer/pull/1054) by [@tiangolo](https://github.com/tiangolo).
21+
522
### Internal
623

724
* ⬆ Bump ruff from 0.7.3 to 0.7.4. PR [#1051](https://github.com/fastapi/typer/pull/1051) by [@dependabot[bot]](https://github.com/apps/dependabot).

docs/tutorial/app-dir.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
You can get the application directory where you can, for example, save configuration files with `typer.get_app_dir()`:
44

5-
```Python hl_lines="9"
6-
{!../docs_src/app_dir/tutorial001.py!}
7-
```
5+
{* docs_src/app_dir/tutorial001.py hl[9] *}
86

97
It will give you a directory for storing configurations appropriate for your CLI program for the current user in each operating system.
108

docs/tutorial/arguments/default.md

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,7 @@ That way the *CLI argument* will be optional *and also* have a default value.
88

99
We can also use `typer.Argument()` to make a *CLI argument* have a default value other than `None`:
1010

11-
//// tab | Python 3.7+
12-
13-
```Python hl_lines="5"
14-
{!> ../docs_src/arguments/default/tutorial001_an.py!}
15-
```
16-
17-
////
18-
19-
//// tab | Python 3.7+ non-Annotated
20-
21-
/// tip
22-
23-
Prefer to use the `Annotated` version if possible.
24-
25-
///
26-
27-
```Python hl_lines="4"
28-
{!> ../docs_src/arguments/default/tutorial001.py!}
29-
```
30-
31-
////
11+
{* docs_src/arguments/default/tutorial001_an.py hl[5] *}
3212

3313
/// tip
3414

@@ -72,27 +52,7 @@ Hello Camila
7252

7353
And we can even make the default value be dynamically generated by passing a function as the `default_factory` argument:
7454

75-
//// tab | Python 3.7+
76-
77-
```Python hl_lines="7-8 11"
78-
{!> ../docs_src/arguments/default/tutorial002_an.py!}
79-
```
80-
81-
////
82-
83-
//// tab | Python 3.7+ non-Annotated
84-
85-
/// tip
86-
87-
Prefer to use the `Annotated` version if possible.
88-
89-
///
90-
91-
```Python hl_lines="6-7 10"
92-
{!> ../docs_src/arguments/default/tutorial002.py!}
93-
```
94-
95-
////
55+
{* docs_src/arguments/default/tutorial002_an.py hl[7:8,11] *}
9656

9757
In this case, we created the function `get_name` that will just return a random `str` each time.
9858

docs/tutorial/arguments/envvar.md

Lines changed: 3 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,7 @@ You can learn more about environment variables in the [Environment Variables](..
1010

1111
To do that, use the `envvar` parameter for `typer.Argument()`:
1212

13-
//// tab | Python 3.7+
14-
15-
```Python hl_lines="5"
16-
{!> ../docs_src/arguments/envvar/tutorial001_an.py!}
17-
```
18-
19-
////
20-
21-
//// tab | Python 3.7+ non-Annotated
22-
23-
/// tip
24-
25-
Prefer to use the `Annotated` version if possible.
26-
27-
///
28-
29-
```Python hl_lines="4"
30-
{!> ../docs_src/arguments/envvar/tutorial001.py!}
31-
```
32-
33-
////
13+
{* docs_src/arguments/envvar/tutorial001_an.py hl[5] *}
3414

3515
In this case, the *CLI argument* `name` will have a default value of `"World"`, but will also read any value passed to the environment variable `AWESOME_NAME` if no value is provided in the command line:
3616

@@ -75,27 +55,7 @@ Hello Mr. Czernobog
7555

7656
You are not restricted to a single environment variable, you can declare a list of environment variables that could be used to get a value if it was not passed in the command line:
7757

78-
//// tab | Python 3.7+
79-
80-
```Python hl_lines="6"
81-
{!> ../docs_src/arguments/envvar/tutorial002_an.py!}
82-
```
83-
84-
////
85-
86-
//// tab | Python 3.7+ non-Annotated
87-
88-
/// tip
89-
90-
Prefer to use the `Annotated` version if possible.
91-
92-
///
93-
94-
```Python hl_lines="4"
95-
{!> ../docs_src/arguments/envvar/tutorial002.py!}
96-
```
97-
98-
////
58+
{* docs_src/arguments/envvar/tutorial002_an.py hl[6] *}
9959

10060
Check it:
10161

@@ -130,27 +90,7 @@ Hello Mr. Anubis
13090

13191
By default, environment variables used will be shown in the help text, but you can disable them with `show_envvar=False`:
13292

133-
//// tab | Python 3.7+
134-
135-
```Python hl_lines="7"
136-
{!> ../docs_src/arguments/envvar/tutorial003_an.py!}
137-
```
138-
139-
////
140-
141-
//// tab | Python 3.7+ non-Annotated
142-
143-
/// tip
144-
145-
Prefer to use the `Annotated` version if possible.
146-
147-
///
148-
149-
```Python hl_lines="4"
150-
{!> ../docs_src/arguments/envvar/tutorial003.py!}
151-
```
152-
153-
////
93+
{* docs_src/arguments/envvar/tutorial003_an.py hl[7] *}
15494

15595
Check it:
15696

0 commit comments

Comments
 (0)