style(wallpaper_changer): ruff auto fix

This commit is contained in:
Lucas Vivo committed 2026-11-16 19:48:08 +01:00
1 parent acb0bc749e
commit 2e4cc9af55
4 files changed
+9 -7

No files matched your search

+2 -2
View File
@@ -2,8 +2,6 @@
import sys
from pathlib import Path
from serverlibrary import setup_logging
from wallpaper_changer.argument_parser import parse_args
from wallpaper_changer.config import Config
from wallpaper_changer.encryption_manager import EncryptionManager
@@ -13,6 +11,8 @@ from wallpaper_changer.monitor_manager import MonitorManager
from wallpaper_changer.wallpaper_builder import WallpaperBuilder
from wallpaper_changer.wallpaper_setter import WallpaperSetter
from serverlibrary import setup_logging
logger = get_logger(__name__)
@@ -1,7 +1,7 @@
from glob import glob
import re
import xml.etree.ElementTree as ET
from dataclasses import dataclass
from glob import glob
from pathlib import Path
from wallpaper_changer.logging_utils import get_logger
@@ -185,7 +185,8 @@ class WallpaperBuilder:
raise ValueError(
f"Cannot open encrypted image while encryption is disabled: {image_path}"
)
decrypted = ImageRepository(image_path.parent).decode_image(image_path, None, private_key, image_record.get("hash"))
decrypted = ImageRepository(image_path.parent).decode_image(image_path, None,
private_key, str(image_record.get("hash")))
if decrypted is None:
raise ValueError(f"Could not decrypt image: {image_path}")
image_data = decrypted
@@ -1,5 +1,4 @@
import random
import tkinter as tk
import unittest
import xml.etree.ElementTree as ET
from pathlib import Path
@@ -19,7 +18,7 @@ class MonitorManagerTests(unittest.TestCase):
for max_monitors in range(1, 5):
x_coord = 0
layout_monitors = []
for _ in range(0, max_monitors):
for _ in range(max_monitors):
layout_monitors.append(Monitor(1920, 1080, x_coord,set("TestMon")))
x_coord+=1920
monitors = ScreenLayout(tuple(layout_monitors))
@@ -144,7 +143,9 @@ class MonitorManagerTests(unittest.TestCase):
drm_root=drm_root,
)
self.assertEqual(monitors.monitor_count, 2)
# import tkinter as tk
#def test_detect_single_connected_monitor_actual_monitor(self) -> None:
# """Verify a single enabled connector produces a one-monitor layout."""
# args = self.parse_args()