CI: Update static checks to black 23.3.0

And apply it to the codebase, removing empty lines at the start of blocks.
This commit is contained in:
Rémi Verschelde 2023-06-19 23:33:02 +02:00
parent 764193629f
commit c9c941e339
No known key found for this signature in database
GPG key ID: C3336907360768E1
14 changed files with 4 additions and 38 deletions

View file

@ -259,14 +259,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)
@ -507,7 +504,6 @@ def sort_module_list(env):
def use_windows_spawn_fix(self, platform=None):
if os.name != "nt":
return # not needed, only for windows
@ -522,7 +518,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 = {
@ -545,7 +540,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
@ -566,7 +560,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"):
@ -594,7 +587,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
@ -708,7 +700,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;")