summaryrefslogtreecommitdiff
path: root/platform/android
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/android
parentf47979f0874b2ca6134e71575fbb359c6cc5ced0 (diff)
ci: add Python static analysis check via mypy
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/detect.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py
index f3e3f80dd5..e541aa0373 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -3,6 +3,11 @@ import sys
import platform
import subprocess
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from SCons import Environment
+
def is_active():
return True
@@ -17,8 +22,6 @@ def can_build():
def get_opts():
- from SCons.Variables import BoolVariable, EnumVariable
-
return [
("ANDROID_SDK_ROOT", "Path to the Android SDK", get_env_android_sdk_root()),
("ndk_platform", 'Target platform (android-<api>, e.g. "android-24")', "android-24"),
@@ -74,7 +77,7 @@ def install_ndk_if_needed(env):
env["ANDROID_NDK_ROOT"] = get_android_ndk_root(env)
-def configure(env):
+def configure(env: "Environment"):
# Validate arch.
supported_arches = ["x86_32", "x86_64", "arm32", "arm64"]
if env["arch"] not in supported_arches: