ruff: add RET lint

lints about assign and immediatly returning a variable
This commit is contained in:
Marcel Hellwig
2026-01-05 13:29:49 +01:00
parent 805a6981a6
commit 75406cbc64
17 changed files with 159 additions and 213 deletions

View File

@@ -8,8 +8,7 @@ from PIL import Image
def get_year_from_date(first_air_date: str | None) -> int | None:
if first_air_date:
return int(first_air_date.split("-")[0])
else:
return None
return None
def download_poster_image(storage_path: Path, poster_url: str, uuid: UUID) -> bool:
@@ -23,5 +22,4 @@ def download_poster_image(storage_path: Path, poster_url: str, uuid: UUID) -> bo
original_image.save(image_file_path.with_suffix(".avif"), quality=50)
original_image.save(image_file_path.with_suffix(".webp"), quality=50)
return True
else:
return False
return False