summaryrefslogtreecommitdiff
path: root/platform/uwp
diff options
context:
space:
mode:
authorJiri Suchan <yed@vanyli.net>2022-08-23 22:21:46 +0900
committerJiri Suchan <yed@vanyli.net>2022-09-30 19:03:17 +0700
commitc5bd2f9dce17f3e6bf7d9681243e2743633db6f0 (patch)
tree5cc835252cc999d086deaf05f3821ef3ce9e37e8 /platform/uwp
parentf47979f0874b2ca6134e71575fbb359c6cc5ced0 (diff)
ci: add Python static analysis check via mypy
Diffstat (limited to 'platform/uwp')
-rw-r--r--platform/uwp/detect.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py
index 2c5746cb06..64fe5bc4a2 100644
--- a/platform/uwp/detect.py
+++ b/platform/uwp/detect.py
@@ -3,6 +3,11 @@ import os
import sys
from platform_methods import detect_arch
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from SCons import Environment
+
def is_active():
return True
@@ -39,7 +44,7 @@ def get_flags():
]
-def configure(env):
+def configure(env: "Environment"):
# Validate arch.
supported_arches = ["x86_32", "x86_64", "arm32"]
if env["arch"] not in supported_arches:
@@ -83,7 +88,7 @@ def configure(env):
env.AppendUnique(CCFLAGS=["/utf-8"])
# ANGLE
- angle_root = os.getenv("ANGLE_SRC_PATH")
+ angle_root = os.environ["ANGLE_SRC_PATH"]
env.Prepend(CPPPATH=[angle_root + "/include"])
jobs = str(env.GetOption("num_jobs"))
angle_build_cmd = (
@@ -94,7 +99,7 @@ def configure(env):
+ " /p:Configuration=Release /p:Platform="
)
- if os.path.isfile(str(os.getenv("ANGLE_SRC_PATH")) + "/winrt/10/src/angle.sln"):
+ if os.path.isfile(f"{angle_root}/winrt/10/src/angle.sln"):
env["build_angle"] = True
## Architecture