Skip to content

Commit

Permalink
typing
Browse files Browse the repository at this point in the history
  • Loading branch information
time4tea committed Feb 10, 2024
1 parent 0d27b26 commit 5072dbb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gopro_overlay/widgets/msi.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Callable

from PIL import Image, ImageDraw

from .asi import roundup, scale, Arc
Expand All @@ -6,7 +8,8 @@

class MotorspeedIndicator(Widget):

def __init__(self, size, font, needle, reading, green, yellow, end, rotate=180, outline=2):
def __init__(self, size: int, font, needle: int, reading: Callable[[], float], green: int, yellow: int, end: int,
rotate: int = 180, outline: int = 2):
self.end = end
self.yellow = yellow
self.green = green
Expand Down Expand Up @@ -115,7 +118,8 @@ def draw(self, image: Image, draw: ImageDraw):

class MotorspeedIndicator2(Widget):

def __init__(self, size, font, reading, green, yellow, end, rotate=180, outline=2):
def __init__(self, size: int, font, reading: Callable[[], float], green: int, yellow: int, end: int,
rotate: int = 180, outline: int = 2):
self.end = end
self.yellow = yellow
self.green = green
Expand Down

0 comments on commit 5072dbb

Please sign in to comment.