From d346026e1766e6e2796894dc94c12804056e654d Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Thu, 22 Jan 2026 14:37:02 +0100 Subject: [PATCH] Update code examples in `docs/deployment/docker.md` to follow latest Python syntax --- docs/en/docs/deployment/docker.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/en/docs/deployment/docker.md b/docs/en/docs/deployment/docker.md index 6b71f7360..7219f3afc 100644 --- a/docs/en/docs/deployment/docker.md +++ b/docs/en/docs/deployment/docker.md @@ -145,8 +145,6 @@ There are other formats and tools to define and install package dependencies. * Create a `main.py` file with: ```Python -from typing import Union - from fastapi import FastAPI app = FastAPI() @@ -158,7 +156,7 @@ def read_root(): @app.get("/items/{item_id}") -def read_item(item_id: int, q: Union[str, None] = None): +def read_item(item_id: int, q: str | None = None): return {"item_id": item_id, "q": q} ```