From d549baa5e1be8ef8734df63096d18925e8071e80 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sun, 28 Dec 2025 01:36:24 +1300 Subject: [PATCH] straight up: ruff format (#11329) * straight up: ruff format * Apply suggestions from code review --- .azure-pipelines/scripts/combine-coverage.py | 25 +-- .azure-pipelines/scripts/publish-codecov.py | 36 +-- .azure-pipelines/scripts/time-command.py | 11 +- docs/docsite/reformat-yaml.py | 4 +- .../targets/callback/filter_plugins/helper.py | 50 +++-- .../action_plugins/_unsafe_assert.py | 31 +-- .../targets/cmd_runner/library/cmd_echo.py | 14 +- .../single_app_project/core/settings.py | 2 +- .../single_app_project/manage.py | 5 +- .../base_test/simple_project/p1/manage.py | 4 +- .../simple_project/p1/p1/settings.py | 72 +++--- .../base_test/simple_project/p1/p1/urls.py | 2 +- .../single_app_project/core/settings.py | 2 +- .../single_app_project/manage.py | 5 +- .../base_test/simple_project/p1/manage.py | 4 +- .../simple_project/p1/p1/settings.py | 72 +++--- .../base_test/simple_project/p1/p1/urls.py | 2 +- .../targets/flatpak/files/serve.py | 14 +- .../targets/java_cert/files/setupSSLServer.py | 14 +- .../launchd/files/ansible_test_service.py | 2 +- .../plugins/modules/collection_module.py | 10 +- .../plugins/modules/collection_module.py | 10 +- .../plugins/modules/collection_module.py | 10 +- .../plugins/modules/collection_module.py | 10 +- .../library/local_module.py | 10 +- .../targets/lookup_lmdb_kv/test_db.py | 13 +- .../targets/mail/files/smtpserver.py | 28 +-- .../targets/module_helper/library/mdepfail.py | 24 +- .../targets/module_helper/library/msimple.py | 30 +-- .../module_helper/library/msimpleda.py | 12 +- .../targets/module_helper/library/mstate.py | 26 +-- .../supervisorctl/files/sendProcessStdin.py | 6 +- .../plugins/modules/collection_module.py | 10 +- .../test_a_module/library/local_module.py | 10 +- tests/sanity/extra/aliases.py | 43 ++-- tests/sanity/extra/botmeta.py | 211 ++++++++++-------- 36 files changed, 438 insertions(+), 396 deletions(-) diff --git a/.azure-pipelines/scripts/combine-coverage.py b/.azure-pipelines/scripts/combine-coverage.py index 3b2fd993db..bfc5d9cd89 100755 --- a/.azure-pipelines/scripts/combine-coverage.py +++ b/.azure-pipelines/scripts/combine-coverage.py @@ -11,8 +11,7 @@ Keep in mind that Azure Pipelines does not enforce unique job display names (onl It is up to pipeline authors to avoid name collisions when deviating from the recommended format. """ -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type +from __future__ import annotations import os import re @@ -24,12 +23,12 @@ def main(): """Main program entry point.""" source_directory = sys.argv[1] - if '/ansible_collections/' in os.getcwd(): + if "/ansible_collections/" in os.getcwd(): output_path = "tests/output" else: output_path = "test/results" - destination_directory = os.path.join(output_path, 'coverage') + destination_directory = os.path.join(output_path, "coverage") if not os.path.exists(destination_directory): os.makedirs(destination_directory) @@ -38,27 +37,27 @@ def main(): count = 0 for name in os.listdir(source_directory): - match = re.search('^Coverage (?P[0-9]+) (?P