summaryrefslogtreecommitdiffstats
path: root/platform/windows/detect.py
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-05-22 09:26:42 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-05-22 09:26:42 +0200
commitc40c89f94cc8a6dced2b14f51aa2e87b02b7ee22 (patch)
tree8d52a7b8716376aab4a7cb2aaa0d68a7518ec6cc /platform/windows/detect.py
parente34b97312e91606dae2e26064dcd628dc360dc88 (diff)
parentd9f8ef68df1df8cf88d484fc22995f55a9c3f9aa (diff)
downloadredot-engine-c40c89f94cc8a6dced2b14f51aa2e87b02b7ee22.tar.gz
Merge pull request #90457 from Chubercik/ruff-formatter
Replace `black` formatter with `ruff`
Diffstat (limited to 'platform/windows/detect.py')
-rw-r--r--platform/windows/detect.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 93eb34001e..b66cdadc41 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -1,12 +1,12 @@
-import methods
import os
import subprocess
import sys
-from methods import print_warning, print_error
-from platform_methods import detect_arch
-
from typing import TYPE_CHECKING
+import methods
+from methods import print_error, print_warning
+from platform_methods import detect_arch
+
if TYPE_CHECKING:
from SCons.Script.SConscript import SConsEnvironment
@@ -178,7 +178,7 @@ def get_opts():
caller_frame = inspect.stack()[1]
caller_script_dir = os.path.dirname(os.path.abspath(caller_frame[1]))
d3d12_deps_folder = os.path.join(caller_script_dir, "bin", "build_deps")
- except: # Give up.
+ except Exception: # Give up.
d3d12_deps_folder = ""
return [
@@ -523,7 +523,7 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config):
env.Append(CXXFLAGS=["/bigobj"])
# PIX
- if not env["arch"] in ["x86_64", "arm64"] or env["pix_path"] == "" or not os.path.exists(env["pix_path"]):
+ if env["arch"] not in ["x86_64", "arm64"] or env["pix_path"] == "" or not os.path.exists(env["pix_path"]):
env["use_pix"] = False
if env["use_pix"]:
@@ -750,7 +750,7 @@ def configure_mingw(env: "SConsEnvironment"):
env.Append(LIBS=["dxgi", "dxguid"])
# PIX
- if not env["arch"] in ["x86_64", "arm64"] or env["pix_path"] == "" or not os.path.exists(env["pix_path"]):
+ if env["arch"] not in ["x86_64", "arm64"] or env["pix_path"] == "" or not os.path.exists(env["pix_path"]):
env["use_pix"] = False
if env["use_pix"]: