8000 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks · fastapi/fastapi@297779f · GitHub
[go: up one dir, main page]

Skip to content

Commit 297779f

Browse files
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
1 parent 94eb344 commit 297779f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/zh/docs/tutorial/query-params.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ http://127.0.0.1:8000/items/?skip=20
7676
!!! note "笔记"
7777

7878
因为默认值为 `= None`,FastAPI 把 `q` 识别为可选参数。
79-
79+
8080
FastAPI 不使用 `Optional[str]` 中的 `Optional`(只使用 `str`),但 `Optional[str]` 可以帮助编辑器发现代码中的错误。
8181

8282
## 查询参数类型转换
@@ -199,4 +199,3 @@ http://127.0.0.1:8000/items/foo-item?needy=sooooneedy
199199
!!! tip "提示"
200200

201201
还可以像在[路径参数](path-params.md#predefined-values){.internal-link target=_blank} 中那样使用 `Enum`。
202-

0 commit comments

Comments
 (0)
0