diff --git a/komodo/lint.py b/komodo/lint.py index 55df3a7d1..0aefcdf0e 100755 --- a/komodo/lint.py +++ b/komodo/lint.py @@ -145,14 +145,14 @@ def lint_main(): mns, deps, versions = report.maintainers, report.dependencies, report.versions except ValueError as err: sys.exit(str(err)) - print("%d packages" % len(mns)) + print(f"{len(mns)} packages") if not any(err.err for err in mns + deps + versions): print("No errors found") sys.exit(0) for err in mns + deps + versions: if err.err: - dep = ": %s" % ", ".join(err.depends) if err.depends else "" + dep = f": {', '.join(err.depends)}" if err.depends else "" print(f"{err.err}{dep}") if not any(err.err for err in mns + deps): diff --git a/pyproject.toml b/pyproject.toml index 26a7d96f4..be3644796 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,6 @@ komodo-transpiler = "komodo.release_transpiler:main" disable = [ "bad-inline-option", "consider-using-dict-items", - "consider-using-f-string", "consider-using-sys-exit", "consider-using-with", "deprecated-pragma", diff --git a/tests/test_post_messages.py b/tests/test_post_messages.py index 239c42578..bed4ca9a5 100644 --- a/tests/test_post_messages.py +++ b/tests/test_post_messages.py @@ -122,7 +122,7 @@ def test_main_missing_message_file(tmpdir): ] with pytest.raises(SystemExit) as excinfo: main(args) - assert "message file {} does not exisit".format("not-existing") in str( + assert "message file not-existing does not exisit" in str( excinfo.value, ) diff --git a/tests/test_release_transpiler.py b/tests/test_release_transpiler.py index 2197c36e0..b79dbf515 100644 --- a/tests/test_release_transpiler.py +++ b/tests/test_release_transpiler.py @@ -71,11 +71,7 @@ def test_transpile_add_argument(tmpdir, matrix): for py_coordinate in matrix["py"]: py_coordinate_filename_format = f"py{py_coordinate.replace('.', '')}" assert os.path.isfile( - "{}-{}-{}.yml".format( - release_base, - py_coordinate_filename_format, - rhel_coordinate_filename_format, - ), + f"{release_base}-{py_coordinate_filename_format}-{rhel_coordinate_filename_format}.yml" )