Refactor: Use cooresponding model in Digit and DigitCounter

This commit is contained in:
LmeSzinc 2024-05-12 02:30:30 +08:00
parent 3ce75fe1ef
commit 71d23545a0

View File

@ -325,7 +325,7 @@ class Ocr:
class Digit(Ocr): class Digit(Ocr):
def __init__(self, button: ButtonWrapper, lang='en', name=None): def __init__(self, button: ButtonWrapper, lang=None, name=None):
super().__init__(button, lang=lang, name=name) super().__init__(button, lang=lang, name=name)
def format_result(self, result) -> int: def format_result(self, result) -> int:
@ -345,7 +345,7 @@ class Digit(Ocr):
class DigitCounter(Ocr): class DigitCounter(Ocr):
def __init__(self, button: ButtonWrapper, lang='en', name=None): def __init__(self, button: ButtonWrapper, lang=None, name=None):
super().__init__(button, lang=lang, name=name) super().__init__(button, lang=lang, name=name)
@classmethod @classmethod