From 199ddfc2f6b752fa206c750ecb9f1bc798172a5f Mon Sep 17 00:00:00 2001 From: Grayson Pike Date: Mon, 4 Mar 2024 17:35:36 -0500 Subject: [PATCH] Update query params tutorial note to reference 3.10+ syntax --- docs/en/docs/tutorial/query-params-str-validations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/docs/tutorial/query-params-str-validations.md b/docs/en/docs/tutorial/query-params-str-validations.md index 7a9bc4875..5ec7b85f1 100644 --- a/docs/en/docs/tutorial/query-params-str-validations.md +++ b/docs/en/docs/tutorial/query-params-str-validations.md @@ -21,7 +21,7 @@ The query parameter `q` is of type `Union[str, None]` (or `str | None` in Python !!! note FastAPI will know that the value of `q` is not required because of the default value `= None`. - The `Union` in `Union[str, None]` will allow your editor to give you better support and detect errors. + The `| None` in `q: str | None` is not used by FastAPI, but will allow your editor to give you better support and detect errors. ## Additional validation