Skip to content

Commit

Permalink
Simplify ports to probe logic from lint consider-using-max-builtin (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
thompson318 committed Jun 6, 2024
1 parent 2cd9c63 commit 966be39
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sksurgerynditracker/nditracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ def _get_serial_port_name(configuration):
serial_ports = list_ports.comports()
result = None
name = None
if ports_to_probe > len(serial_ports):
ports_to_probe = len(serial_ports)
ports_to_probe = min(ports_to_probe, len(serial_ports))

if serial_port is None:
for port_no in range(ports_to_probe):
Expand Down

0 comments on commit 966be39

Please sign in to comment.