mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
Meta: Support python 3.9 in ladybird.py
This is the default python version on macOS, so let's support it since it is trivial for now. Using "str | None" as a type annotation is only supported in python 3.10 or later.
This commit is contained in:
parent
a76e880dfe
commit
8e792cd094
|
|
@ -15,6 +15,7 @@ import subprocess
|
|||
import sys
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
sys.path.append(str(Path(__file__).resolve().parent.parent))
|
||||
|
||||
|
|
@ -329,7 +330,7 @@ def ensure_ladybird_source_dir() -> Path:
|
|||
return ladybird_source_dir
|
||||
|
||||
|
||||
def build_main(build_dir: Path, target: str | None = None, args: list[str] = []):
|
||||
def build_main(build_dir: Path, target: Optional[str] = None, args: list[str] = []):
|
||||
build_args = [
|
||||
"cmake",
|
||||
"--build",
|
||||
|
|
@ -351,7 +352,7 @@ def build_main(build_dir: Path, target: str | None = None, args: list[str] = [])
|
|||
sys.exit(1)
|
||||
|
||||
|
||||
def test_main(build_dir: Path, preset: str, pattern: str | None):
|
||||
def test_main(build_dir: Path, preset: str, pattern: Optional[str]):
|
||||
test_args = [
|
||||
"ctest",
|
||||
"--preset",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user