diff --git a/API/main.py b/API/main.py index c2d9834..14302db 100755 --- a/API/main.py +++ b/API/main.py @@ -1,6 +1,7 @@ #!/usr/bin/env python from deps.samplebase import SampleBase from rgbmatrix import graphics +from typing import Optional from PIL import Image import requests @@ -294,7 +295,7 @@ class Matrix(SampleBase): self.image = Image.open(requests.get(url, stream=True).raw) # display image at position with dimensions in current color - def display_image(self, x: int, y: int, w: int|None = None, h: int|None = None): + def display_image(self, x: int, y: int, w: Optional[int] = None, h: Optional[int] = None): # resize image to specified or max size self.image.resize((w or self.matrix.width, h or self.matrix.height), Image.ANTIALIAS) # set image at position