mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-15 00:43:28 +00:00
wmltools: shorten code by using sorted() instead of .sort()
This commit is contained in:
parent
889eb5aa7b
commit
bb51399d26
@ -149,9 +149,7 @@ class Forest:
|
||||
# Always look at _main.cfg first
|
||||
maincfgs = [elem for elem in subtree if elem.endswith("_main.cfg")]
|
||||
rest = [elem for elem in subtree if not elem.endswith("_main.cfg")]
|
||||
maincfgs.sort()
|
||||
rest.sort()
|
||||
subtree = maincfgs + rest
|
||||
subtree = sorted(maincfgs) + sorted(rest)
|
||||
self.forest.append(subtree)
|
||||
for i in self.forest:
|
||||
# Ignore version-control subdirectories and Emacs tempfiles
|
||||
|
Loading…
x
Reference in New Issue
Block a user