Style: Apply fixes from black and codespell

This commit is contained in:
Rémi Verschelde 2025-04-25 14:52:54 +02:00
parent 580d87b837
commit 9a8b5848d8
No known key found for this signature in database
GPG key ID: C3336907360768E1
69 changed files with 85 additions and 117 deletions

View file

@ -179,14 +179,11 @@ const char *const VERSION_HASH = "{git_hash}";
def parse_cg_file(fname, uniforms, sizes, conditionals):
fs = open(fname, "r")
line = fs.readline()
while line:
if re.match(r"^\s*uniform", line):
res = re.match(r"uniform ([\d\w]*) ([\d\w]*)")
type = res.groups(1)
name = res.groups(2)
@ -427,7 +424,6 @@ def sort_module_list(env):
def use_windows_spawn_fix(self, platform=None):
if os.name != "nt":
return # not needed, only for windows
@ -442,7 +438,6 @@ def use_windows_spawn_fix(self, platform=None):
self.Replace(ARFLAGS="q")
def mySubProcess(cmdline, env):
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
popen_args = {
@ -465,7 +460,6 @@ def use_windows_spawn_fix(self, platform=None):
return rv
def mySpawn(sh, escape, cmd, args, env):
newargs = " ".join(args[1:])
cmdline = cmd + " " + newargs
@ -486,7 +480,6 @@ def use_windows_spawn_fix(self, platform=None):
def save_active_platforms(apnames, ap):
for x in ap:
svg_names = []
if os.path.isfile(x + "/logo.svg"):
@ -514,7 +507,6 @@ def save_active_platforms(apnames, ap):
def no_verbose(sys, env):
colors = {}
# Colors are disabled in non-TTY environments such as pipes. This means
@ -628,7 +620,6 @@ def detect_visual_c_compiler_version(tools_env):
# and for VS 2017 and newer we check VCTOOLSINSTALLDIR:
if "VCTOOLSINSTALLDIR" in tools_env:
# Newer versions have a different path available
vc_amd64_compiler_detection_index = (
tools_env["PATH"].upper().find(tools_env["VCTOOLSINSTALLDIR"].upper() + "BIN\\HOSTX64\\X64;")