📝 Update order of examples, latest Python version first, and simplify version tab names (#9269)

* 📝 Simplify names in Python versions in tabs in docs

* 📝 Update docs for Types Intro, explain Python 3.6+, Python 3.9+, Python 3.10+

* 📝 Re-order all Python examples, show latest Python versions first
This commit is contained in:
Sebastián Ramírez
2023-03-18 17:16:02 +01:00
committed by GitHub
parent 166d348ea6
commit 69673548bc
55 changed files with 2598 additions and 2595 deletions

View File

@@ -110,34 +110,25 @@ It has a `POST` operation that could return several errors.
Both *path operations* require an `X-Token` header.
=== "Python 3.6 and above"
```Python
{!> ../../../docs_src/app_testing/app_b_an/main.py!}
```
=== "Python 3.9 and above"
```Python
{!> ../../../docs_src/app_testing/app_b_an_py39/main.py!}
```
=== "Python 3.10 and above"
=== "Python 3.10+"
```Python
{!> ../../../docs_src/app_testing/app_b_an_py310/main.py!}
```
=== "Python 3.6 and above - non-Annotated"
!!! tip
Try to use the main, `Annotated` version better.
=== "Python 3.9+"
```Python
{!> ../../../docs_src/app_testing/app_b/main.py!}
{!> ../../../docs_src/app_testing/app_b_an_py39/main.py!}
```
=== "Python 3.10 and above - non-Annotated"
=== "Python 3.6+"
```Python
{!> ../../../docs_src/app_testing/app_b_an/main.py!}
```
=== "Python 3.10+ non-Annotated"
!!! tip
Try to use the main, `Annotated` version better.
@@ -146,6 +137,15 @@ Both *path operations* require an `X-Token` header.
{!> ../../../docs_src/app_testing/app_b_py310/main.py!}
```
=== "Python 3.6+ non-Annotated"
!!! tip
Try to use the main, `Annotated` version better.
```Python
{!> ../../../docs_src/app_testing/app_b/main.py!}
```
### Extended testing file
You could then update `test_main.py` with the extended tests: