From 9f97e5c84e8a785206d4f549f8002b51aee8f353 Mon Sep 17 00:00:00 2001 From: Niklas Lantau Date: Wed, 16 Feb 2022 16:47:05 +0100 Subject: [PATCH] Added typing to serial_write() Added type annotation for serial_write() parameters and return types. --- tools/idf_monitor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/idf_monitor.py b/tools/idf_monitor.py index e0620ab843..33f7df4c47 100755 --- a/tools/idf_monitor.py +++ b/tools/idf_monitor.py @@ -178,7 +178,7 @@ class Monitor: pass normal_print('\n') - def serial_write(self, *args, **kwargs): # type: ignore + def serial_write(self, *args: str, **kwargs: str) -> None: raise NotImplementedError def check_gdb_stub_and_run(self, line: bytes) -> None: @@ -237,7 +237,7 @@ class SerialMonitor(Monitor): self.gdb_helper.gdb_exit = False self.serial_handler.start_cmd_sent = False - def serial_write(self, *args, **kwargs): # type: ignore + def serial_write(self, *args: str, **kwargs: str) -> None: self.serial: serial.Serial try: self.serial.write(*args, **kwargs) @@ -268,7 +268,7 @@ class LinuxMonitor(Monitor): self.console_reader.start() self.serial_reader.start() - def serial_write(self, *args, **kwargs): # type: ignore + def serial_write(self, *args: str, **kwargs: str) -> None: self.serial.stdin.write(*args, **kwargs) def check_gdb_stub_and_run(self, line: bytes) -> None: