mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00: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
Notes:
github-actions[bot]
2025-05-29 23:35:27 +00:00
Author: https://github.com/trflynn89
Commit: 8e792cd094
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4904
Reviewed-by: https://github.com/ADKaster
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue