minor hiccups
This commit is contained in:
parent
fb20275775
commit
73bfc16bfd
2 changed files with 5 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
|||
import colorsys
|
||||
from dataclasses import dataclass
|
||||
from typing import Self
|
||||
|
||||
import numpy as np
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
@ -10,7 +11,7 @@ class AdventImage:
|
|||
img: Image.Image
|
||||
|
||||
@classmethod
|
||||
async def load_standard(cls, fp) -> "AdventImage":
|
||||
async def load_standard(cls, fp) -> Self:
|
||||
"""
|
||||
Bild laden und einen quadratischen Ausschnitt
|
||||
aus der Mitte nehmen
|
||||
|
@ -33,7 +34,7 @@ class AdventImage:
|
|||
|
||||
img = img.resize(
|
||||
size=(500, 500),
|
||||
resample=Image.ANTIALIAS,
|
||||
resample=Image.LANCZOS,
|
||||
)
|
||||
|
||||
# Farbmodell festlegen
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import itertools
|
||||
import random
|
||||
import re
|
||||
from typing import Any, Sequence
|
||||
from typing import Any, Self, Sequence
|
||||
|
||||
from fastapi import Depends
|
||||
from PIL import ImageFont
|
||||
|
@ -17,7 +17,7 @@ from ._image import AdventImage
|
|||
|
||||
class Random(random.Random):
|
||||
@classmethod
|
||||
async def get(cls, bonus_salt: Any = "") -> "Random":
|
||||
async def get(cls, bonus_salt: Any = "") -> Self:
|
||||
cfg = await get_config()
|
||||
return cls(f"{cfg.puzzle.solution}{bonus_salt}")
|
||||
|
||||
|
|
Loading…
Reference in a new issue