From b009ce4acfa4243f13a3171c866e14174d645faa Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 15 Jun 2023 09:14:51 +0200 Subject: [PATCH] fix linting --- ansiblelater/standard.py | 2 +- ansiblelater/utils/yamlhelper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ansiblelater/standard.py b/ansiblelater/standard.py index 5fd3c6b..4a66bc7 100644 --- a/ansiblelater/standard.py +++ b/ansiblelater/standard.py @@ -321,7 +321,7 @@ class StandardLoader(): try: spec.loader.exec_module(module) except (ImportError, NameError) as e: - sysexit_with_message(f"Failed to load roles file {filename}: \n {str(e)}") + sysexit_with_message(f"Failed to load roles file {filename}: \n {e!s}") try: for _name, obj in inspect.getmembers(module): diff --git a/ansiblelater/utils/yamlhelper.py b/ansiblelater/utils/yamlhelper.py index 57fcb42..05207a9 100644 --- a/ansiblelater/utils/yamlhelper.py +++ b/ansiblelater/utils/yamlhelper.py @@ -490,7 +490,7 @@ def extract_from_list(blocks, candidates): results.extend(add_action_type(block[candidate], candidate, meta_data)) elif block[candidate] is not None: raise RuntimeError( - f"Key '{candidate}' defined, but bad value: '{str(block[candidate])}'" + f"Key '{candidate}' defined, but bad value: '{block[candidate]!s}'" ) return results