Skip to contentSkip to conversation

checkkconfigsymbols.py: don't sort similar symbols

PATCH New Valentin Rothberg 1 participant 1 message Jan 18, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 checkkconfigsymbols.py: don't sort similar symbols

Don't sort the list of string-similar Kconfig symbols alphabetically to preserve the correct order of string similarity.

---
 scripts/checkkconfigsymbols.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
scripts/checkkconfigsymbols.py +3 -3
index 3820f00b066a..f1d6b14081ac 100755
@@ -2,7 +2,7 @@
 
 """Find Kconfig symbols that are referenced but not defined."""
 
-# (c) 2014-2016 Valentin Rothberg <[email protected]>
+# (c) 2014-2017 Valentin Rothberg <[email protected]>
 # (c) 2014 Stefan Hengelein <[email protected]>
 #
 # Licensed under the terms of the GNU GPL License version 2
@@ -269,7 +269,7 @@ def find_sims(symbol, ignore, defined=[]):
     """Return a list of max. ten Kconfig symbols that are string-similar to
     @symbol."""
     if defined:
-        return sorted(difflib.get_close_matches(symbol, set(defined), 10))
+        return difflib.get_close_matches(symbol, set(defined), 10)
 
     pool = Pool(cpu_count(), init_worker)
     kfiles = []
@@ -284,7 +284,7 @@ def find_sims(symbol, ignore, defined=[]):
     for res in pool.map(parse_kconfig_files, arglist):
         defined.extend(res[0])
 
-    return sorted(difflib.get_close_matches(symbol, set(defined), 10))
+    return difflib.get_close_matches(symbol, set(defined), 10)
 
 
 def get_files():
Signature · 1 line
2.11.0