Skip to content

Commit becabac

Browse files
committed
fix ambiguous args
1 parent 0cede86 commit becabac

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/daniel_chin_python_alt_stdlib/serial_monitor_colored.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@ def __init__(self):
3434
args = parser.parse_args()
3535

3636
self.baud_rate: int = args.baud_rate
37-
self.port_names: str = args.port_names
37+
assert self.baud_rate is not None
38+
self.port_names: list[str] = args.port_names
39+
assert self.port_names is not None
3840

3941
def syncPrint(*args, **kw):
4042
with printLock:
4143
print(*args, **kw)
4244

43-
def main(port_names: List[str], baud_rate: int):
45+
def main(port_names: list[str], baud_rate: int):
4446
global should_exit
4547

4648
colorama.init()
@@ -92,6 +94,7 @@ def run(self):
9294
def flush():
9395
nonlocal line_birth
9496

97+
assert line_birth is not None
9598
timestamp = datetime.fromtimestamp(
9699
line_birth,
97100
).strftime('%H:%M:%S')

0 commit comments

Comments
 (0)