Skip to content

Commit

Permalink
Make linter happy: F811 redefinition of unused 'sort_key'.
Browse files Browse the repository at this point in the history
  • Loading branch information
icemac committed Aug 21, 2023
1 parent 1d496b3 commit 2e4ab6a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/grokcore/component/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def sort_components(components, key=None):
"""Sort a list of components using the information provided by
`grok.order`.
"""
sort_key = _sort_key
if key is not None:
if key is None:
sort_key = _sort_key
else:
def sort_key(item):
return _sort_key(key(item))

Expand Down

0 comments on commit 2e4ab6a

Please sign in to comment.