Tests/LibWeb: Use Optional instead of | None syntax in echo script

The `str | None` syntax is only supported in Python 3.10+ and we can
support more Python versions without compromising readability by
importing the `Optional` type.
This commit is contained in:
rmg-x 2024-12-05 19:20:05 -06:00 committed by Tim Ledbetter
parent e4bc6178b9
commit 08b8c88ac3
Notes: github-actions[bot] 2024-12-06 06:10:46 +00:00

View file

@ -6,7 +6,7 @@ import os
import socketserver
import sys
import time
from typing import Dict
from typing import Dict, Optional
"""
Description:
@ -22,9 +22,9 @@ class Echo:
method: str
path: str
status: int
headers: Dict[str, str] | None
body: str | None
delay_ms: int | None
headers: Optional[Dict[str, str]]
body: Optional[str]
delay_ms: Optional[str]
# In-memory store for echo responses