Skip to content

Commit

Permalink
key-order: use itemgetter instead of lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
jeefberkey committed Sep 17, 2022
1 parent 823136a commit ddb4a16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ansiblelint/rules/key_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import sys
from collections import OrderedDict as odict
from operator import itemgetter
from typing import Any

from ansiblelint.config import options
Expand Down Expand Up @@ -49,7 +50,7 @@ def matchtask(
sorted_actual_order = odict(
sorted(
actual_order.items(),
key=lambda item: item[1],
key=itemgetter(1),
)
)

Expand Down

0 comments on commit ddb4a16

Please sign in to comment.