Enforce Path type

This commit is contained in:
jpk 2022-05-30 09:13:28 +02:00
parent 6e84ac2b6e
commit 41c506ae17
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,8 @@ from .wallpapers import move_wallpaper, scan_directory
default=Path("~/Pictures/wallpapers/by-resolution").expanduser(),
)
def sort(source: Path, target: Path):
source = Path(source)
target = Path(target)
if not target.exists():
target.mkdir()
for wallpaper in scan_directory(source):