improved pins validation

This commit is contained in:
Maxim Devaev
2021-09-08 06:08:11 +03:00
parent 5d1228eb9e
commit ca812117e4
10 changed files with 20 additions and 16 deletions

View File

@@ -75,7 +75,9 @@ class BaseUserGpioDriver(BasePlugin):
return set(UserGpioModes.ALL)
@classmethod
def get_pin_validator(cls) -> Callable[[Any], str]:
def get_pin_validator(cls) -> Callable[[Any], Any]:
# XXX: The returned value will be forcibly converted to a string
# in kvmd/apps/kvmd/ugpio.py, i.e. AFTER validation.
raise NotImplementedError
def register_input(self, pin: str, debounce: float) -> None: