From 40b980c953db024539770fb78b96dcc1efe95a5c Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Fri, 28 Jun 2024 19:07:44 +0200 Subject: [PATCH] Enforce ruff/refurb rule FURB192 FURB192 Prefer `max` over `sorted()` to compute the maximum value in a sequence --- setuptools/msvc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index a3d350fe509..3991aff24db 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -629,7 +629,7 @@ def _find_latest_available_vs_ver(self): vc_vers = set(reg_vc_vers) vc_vers.update(self.known_vs_paths) - return sorted(vc_vers)[-1] + return max(vc_vers) def find_reg_vs_vers(self): """