eric6/Preferences/PreferencesLexer.py

changeset 8234
fcb6b4b96274
parent 8218
7c09585bd960
child 8259
2bbec88047dd
diff -r bad78a592cc2 -r fcb6b4b96274 eric6/Preferences/PreferencesLexer.py
--- 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
     

eric ide

mercurial