From 7fa561cd326ee15d27ab4793d918773fb64c089a 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 de4b05f928..70c64cf90c 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -390,7 +390,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): """