From 2e671cfd8be1a867cb6717732f1045fc026aeba0 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Thu, 11 Jul 2024 23:50:39 +1000 Subject: [PATCH] [CI] Format code according to conventions (#24095) Format code according to conventions --- util/ci/index_generator.py | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/util/ci/index_generator.py b/util/ci/index_generator.py index b6440bbffb71..f2f7f4d41671 100755 --- a/util/ci/index_generator.py +++ b/util/ci/index_generator.py @@ -48,18 +48,20 @@ def _ansi2html_styles(): return "\n".join([str(s) for s in styles]) -def _git_log(count = 4): +def _git_log(count=4): os.chdir(qmk_firmware_dir) ret = _run(f"git log -n {count} --color=always --no-merges --topo-order --stat").stdout.strip() os.chdir(orig_cwd) return ret + def _git_describe(): os.chdir(qmk_firmware_dir) ret = _run("git describe --tags --always --dirty").stdout.strip() os.chdir(orig_cwd) return ret + def _git_revision(): os.chdir(qmk_firmware_dir) ret = _run("git rev-parse HEAD").stdout.strip() @@ -88,22 +90,18 @@ def _git_revision(): txt = KEYBOARD_PATTERN.sub("", KEYMAP_PATTERN.sub("", txt)).strip() - failures.append( - { - "stdout": txt, - "keyboard": m_kb.group("keyboard"), - "keymap": m_km.group("keymap"), - } - ) + failures.append({ + "stdout": txt, + "keyboard": m_kb.group("keyboard"), + "keymap": m_km.group("keymap"), + }) template = env.get_template("index.html.j2") -print( - template.render( - ansi2html_styles=_ansi2html_styles(), - git_log=_git_log(), - git_describe=_git_describe(), - git_revision=_git_revision(), - binaries=binaries, - failures=failures, - ) -) +print(template.render( + ansi2html_styles=_ansi2html_styles(), + git_log=_git_log(), + git_describe=_git_describe(), + git_revision=_git_revision(), + binaries=binaries, + failures=failures, +))