mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 12:20:00 +01: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
|
|
@ -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 New Issue
Block a user