diff --git a/wallpaper_changer/main.py b/wallpaper_changer/main.py index 181477d..026b9d2 100755 --- a/wallpaper_changer/main.py +++ b/wallpaper_changer/main.py @@ -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__) diff --git a/wallpaper_changer/src/wallpaper_changer/argument_parser.py b/wallpaper_changer/src/wallpaper_changer/argument_parser.py index 7fd63ba..65b8f88 100644 --- a/wallpaper_changer/src/wallpaper_changer/argument_parser.py +++ b/wallpaper_changer/src/wallpaper_changer/argument_parser.py @@ -6,7 +6,6 @@ from importlib.metadata import version from pathlib import Path from serverlibrary import parser_add_loglevel - from wallpaper_changer.config import Config from wallpaper_changer.logging_utils import get_logger diff --git a/wallpaper_changer/src/wallpaper_changer/monitor_manager.py b/wallpaper_changer/src/wallpaper_changer/monitor_manager.py index b8e21f6..54656cd 100644 --- a/wallpaper_changer/src/wallpaper_changer/monitor_manager.py +++ b/wallpaper_changer/src/wallpaper_changer/monitor_manager.py @@ -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 diff --git a/wallpaper_changer/tests/unit/test_encryption_manager.py b/wallpaper_changer/tests/unit/test_encryption_manager.py index ff22fbf..e64dd89 100644 --- a/wallpaper_changer/tests/unit/test_encryption_manager.py +++ b/wallpaper_changer/tests/unit/test_encryption_manager.py @@ -6,7 +6,6 @@ from tempfile import TemporaryDirectory from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa - from wallpaper_changer.argument_parser import parse_args from wallpaper_changer.config import Config from wallpaper_changer.encryption_manager import EncryptionManager, FileInfo diff --git a/wallpaper_changer/tests/unit/test_monitor_manager.py b/wallpaper_changer/tests/unit/test_monitor_manager.py index 81ce4bd..8939e0f 100644 --- a/wallpaper_changer/tests/unit/test_monitor_manager.py +++ b/wallpaper_changer/tests/unit/test_monitor_manager.py @@ -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() diff --git a/wallpaper_changer/tests/unit/test_walpaper_builder.py b/wallpaper_changer/tests/unit/test_walpaper_builder.py index 23cf1fa..9205ff8 100644 --- a/wallpaper_changer/tests/unit/test_walpaper_builder.py +++ b/wallpaper_changer/tests/unit/test_walpaper_builder.py @@ -6,7 +6,6 @@ from tempfile import TemporaryDirectory import numpy as np from PIL import Image, UnidentifiedImageError - from wallpaper_changer.argument_parser import parse_args from wallpaper_changer.config import Config from wallpaper_changer.image_repository import ImageRepository