diff -r 1444b4bee64b -r 093dcebe5ecb src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Complexity/ComplexityChecker.py --- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Complexity/ComplexityChecker.py Sun Dec 03 16:44:52 2023 +0100 +++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Complexity/ComplexityChecker.py Sun Dec 03 19:46:34 2023 +0100 @@ -213,7 +213,7 @@ @return sorted list of (line, nodes) tuples @rtype list of tuple of (int,int) """ - lst = [(line, self.__count[line]) for line in sorted(self.__count.keys())] + lst = [(line, self.__count[line]) for line in sorted(self.__count)] return lst def score(self): @@ -223,9 +223,8 @@ @return median line complexity value @rtype float """ - lst = self.__count.values() - sortedList = sorted(lst) - listLength = len(lst) + sortedList = sorted(self.__count.values()) + listLength = len(sortedList) medianIndex = (listLength - 1) // 2 if listLength == 0: