From 75fe34b69b3983c1f74726941e8529e72457e4a4 Mon Sep 17 00:00:00 2001 From: Faustin Lammler Date: Fri, 26 Apr 2024 13:30:05 +0200 Subject: [PATCH] Make black and isort happy --- .pre-commit-config.yaml | 1 + common_factories.py | 5 ++--- define_masters.py | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c4afb4d4..b4b07647 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -87,6 +87,7 @@ repos: hooks: - id: isort name: check python imports order (isort) + args: ["--profile", "black", "--filter-files"] - repo: local hooks: - id: docker-hadolint diff --git a/common_factories.py b/common_factories.py index b39555e5..0dae8a45 100644 --- a/common_factories.py +++ b/common_factories.py @@ -6,8 +6,7 @@ from buildbot.process.remotecommand import RemoteCommand from buildbot.steps.mtrlogobserver import MTR, MtrLogObserver from buildbot.steps.package.rpm.rpmlint import RpmLint -from buildbot.steps.shell import (Compile, SetPropertyFromCommand, - ShellCommand, Test) +from buildbot.steps.shell import Compile, SetPropertyFromCommand, ShellCommand, Test from buildbot.steps.source.github import GitHub from constants import * from utils import * @@ -221,7 +220,7 @@ def addTests(factory, test_type, mtrDbPool, mtrArgs): "sh", "-c", util.Interpolate( - fr""" + rf""" cd mysql-test && exec perl mysql-test-run.pl {test_type_to_mtr_arg[test_type]} --verbose-restart --force --retry=3 --max-save-core=2 --max-save-datadir=10 --max-test-fail=20 --mem --parallel=$(expr %(kw:jobs)s \* 2) %(kw:mtr_additional_args)s """, diff --git a/define_masters.py b/define_masters.py index a3983f95..d5b8065e 100755 --- a/define_masters.py +++ b/define_masters.py @@ -65,8 +65,7 @@ shutil.copyfile("master-private.cfg", dir_path + "/master-private.cfg") buildbot_tac = ( - open("buildbot.tac", encoding="utf-8").read() - % master_config["log_name"] + open("buildbot.tac", encoding="utf-8").read() % master_config["log_name"] ) with open(dir_path + "/buildbot.tac", mode="w", encoding="utf-8") as f: f.write(buildbot_tac)