mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 17:24:48 -05:00
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:
parent
e4bc6178b9
commit
08b8c88ac3
Notes:
github-actions[bot]
2024-12-06 06:10:46 +00:00
Author: https://github.com/rmg-x Commit: https://github.com/LadybirdBrowser/ladybird/commit/08b8c88ac3a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2802 Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue