Skip to content

Commit

Permalink
perf: Use operator module instead of lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Dec 22, 2024
1 parent 99401ce commit a134670
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import re
from collections import defaultdict
from datetime import timedelta
from operator import itemgetter
from pathlib import Path
from urllib.parse import urlsplit

Expand Down Expand Up @@ -37,7 +38,7 @@ def do_build():
versions = frozen_versions

# Get the most recent frozen version. We presently have no strategy for choosing between live versions.
version = max(versions, key=lambda version: version["Date"])
version = max(versions, key=itemgetter("Date"))

response = session.get(version["Base URL"] + "extension.json")
response.raise_for_status()
Expand Down

0 comments on commit a134670

Please sign in to comment.