From 1667362b9d505ade0cd1682d4e38186af5741bec Mon Sep 17 00:00:00 2001 From: Lucas Vivo Date: Mon, 16 Nov 2026 07:48:43 +0100 Subject: [PATCH] style(wallpaper_changer): ruff auto fix --- wallpaper_changer/src/wallpaper_changer/wallpaper_builder.py | 5 ++++- wallpaper_changer/tests/unit/test_image_repository.py | 5 +++-- wallpaper_changer/tests/unit/test_walpaper_builder.py | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/wallpaper_changer/src/wallpaper_changer/wallpaper_builder.py b/wallpaper_changer/src/wallpaper_changer/wallpaper_builder.py index 63d50b1..771c7ed 100644 --- a/wallpaper_changer/src/wallpaper_changer/wallpaper_builder.py +++ b/wallpaper_changer/src/wallpaper_changer/wallpaper_builder.py @@ -105,7 +105,10 @@ class WallpaperBuilder: stroke_fill="black", ) images_used.append(image_record['name']) - logger.info(f"Pasted image {image_record['name']} on monitor at x={monitor.x_coord}, width={monitor.width}, height={monitor.height}") + logger.info( + f"Pasted image {image_record['name']} on monitor " + f"at x={monitor.x_coord}, width={monitor.width}, height={monitor.height}" + ) destination = ( Path(output_path) diff --git a/wallpaper_changer/tests/unit/test_image_repository.py b/wallpaper_changer/tests/unit/test_image_repository.py index 93b18da..e5d4687 100644 --- a/wallpaper_changer/tests/unit/test_image_repository.py +++ b/wallpaper_changer/tests/unit/test_image_repository.py @@ -74,7 +74,7 @@ class ImageRepositoryTests(unittest.TestCase): all(image["file"].suffix == ".jpg_enc" for image in images) ) self.assertTrue( - all(image["hash"] != None for image in images) + all(image["hash"] is not None for image in images) ) self.assertTrue( all(image["file"].parent.name == "corrupt" for image in images) @@ -220,7 +220,8 @@ class ImageRepositoryTests(unittest.TestCase): self.assertEqual( sum(1 for image in images if image["file"].suffix == ".jpg"), 0) self.assertEqual( sum(1 for image in images if image["file"].suffix == ".jpg_enc"), 9) - self.assertTrue( image["name"] == "Foto_Berg05.jpg" for image in images if image["file"].name == "00009.jpg_enc") + self.assertTrue( image["name"] == "Foto_Berg05.jpg" + for image in images if image["file"].name == "00009.jpg_enc") def test_decode_all(self) -> None: with TemporaryDirectory() as temporary_directory: diff --git a/wallpaper_changer/tests/unit/test_walpaper_builder.py b/wallpaper_changer/tests/unit/test_walpaper_builder.py index 23cf1fa..7a2fc76 100644 --- a/wallpaper_changer/tests/unit/test_walpaper_builder.py +++ b/wallpaper_changer/tests/unit/test_walpaper_builder.py @@ -360,7 +360,8 @@ class WallpaperBuilderEdgeCaseTests(unittest.TestCase): "--private-key", str(assets / "test_private_key.pem")) config = Config.load(args) (image_root / "Desktop1920x1080" ).mkdir() - shutil.copy(assets / "Desktop1920x1080" / "Foto_Berg01.jpg", config.img_dir/"Foto_Berg01.jpg") + shutil.copy(assets / "Desktop1920x1080" / "Foto_Berg01.jpg", + config.img_dir/"Foto_Berg01.jpg") # Get file size size = os.path.getsize(config.img_dir/"Foto_Berg01.jpg") # Remove the last 50 bytes