Type hinting

This commit is contained in:
2022-06-05 15:35:36 +02:00
parent 8f9b7501ae
commit 74916a66d8
2 changed files with 6 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ class SerialDevice:
self.serial_port: str = serial_port
self.baudrate = baudrate
def send_command(self, command: str, verbose: bool = False):
def send_command(self, command: str, verbose: bool = False) -> str:
with Serial(self.serial_port, self.baudrate, timeout=1) as s:
if verbose:
print("Send:", command)