From 4e87315f0f54472a50a4e735e8bdb264d0ed6337 Mon Sep 17 00:00:00 2001 From: Joey Vagedes Date: Mon, 6 Jan 2025 07:43:55 -0800 Subject: [PATCH] ruff: Apply ruff format changes --- edk2toolext/image_validation.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/edk2toolext/image_validation.py b/edk2toolext/image_validation.py index 50455e64..c003a06b 100644 --- a/edk2toolext/image_validation.py +++ b/edk2toolext/image_validation.py @@ -316,8 +316,10 @@ def execute(self, pe: PE, config_data: dict) -> Result: if has_characteristic( section.Characteristics, SECTION_CHARACTERISTICS["IMAGE_SCN_MEM_EXECUTE"] ) and has_characteristic(section.Characteristics, SECTION_CHARACTERISTICS["IMAGE_SCN_MEM_WRITE"]): - logging.error(f"[{Result.FAIL}]: Section [{section.Name.decode().strip()}] \ - should not be both Write and Execute") + logging.error( + f"[{Result.FAIL}]: Section [{section.Name.decode().strip()}] \ + should not be both Write and Execute" + ) return Result.FAIL return Result.PASS @@ -394,10 +396,12 @@ def execute(self, pe: PE, config_data: dict) -> Result: req = alignments[0] result = eval(f'{alignment} {req["COMPARISON"]} {req["VALUE"]}') if result is False: - logging.error(f'[{Result.FAIL}: Section Alignment Required: \ + logging.error( + f'[{Result.FAIL}: Section Alignment Required: \ [{target_info["MACHINE_TYPE"]}] \ [{target_info["PROFILE"]}]: \ - [(Detected): {alignment}]') + [(Detected): {alignment}]' + ) return Result.FAIL return Result.PASS