From a77a85a41d4bb9231580c9fa93d119b8b75b2c80 Mon Sep 17 00:00:00 2001 From: Stephen Thompson Date: Thu, 6 Jun 2024 09:18:11 +0100 Subject: [PATCH] consider-using-max-builtin (#85) --- tests/test_listports.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_listports.py b/tests/test_listports.py index 46c8786..4f6e19f 100644 --- a/tests/test_listports.py +++ b/tests/test_listports.py @@ -21,8 +21,7 @@ def test_list_ports(): ndi_port_names.append(ndiDeviceName(port_number)) try: windows_port_number = int(serial_port.device.replace('COM', '')) - if windows_port_number > max_com_port: - max_com_port = windows_port_number + max_com_port = max(max_com_port, windows_port_number) except ValueError: # we're probably not on windows, so don't care pass