--- a/eric6/Preferences/PreferencesLexer.py Tue Apr 13 17:49:05 2021 +0200 +++ b/eric6/Preferences/PreferencesLexer.py Tue Apr 13 18:02:59 2021 +0200 @@ -384,10 +384,8 @@ @return whitespace separated list of words @rtype str """ - if substyle >= 0: - words = self.__lex.substyleWords(style, substyle) - else: - words = "" + words = (self.__lex.substyleWords(style, substyle) if substyle >= 0 + else "") return words @@ -478,10 +476,8 @@ @return flag indicating the existence of a style definition @rtype bool """ - if substyle >= 0: - ok = self.__lex.hasSubstyle(style, substyle) - else: - ok = True + ok = (self.__lex.hasSubstyle(style, substyle) if substyle >= 0 + else True) return ok