eric6/QScintilla/Lexers/LexerPython.py

changeset 8259
2bbec88047dd
parent 8255
2fc483702cd6
child 8260
2161475d9639
diff -r 82b608e352ec -r 2bbec88047dd eric6/QScintilla/Lexers/LexerPython.py
--- a/eric6/QScintilla/Lexers/LexerPython.py	Wed Apr 21 17:56:12 2021 +0200
+++ b/eric6/QScintilla/Lexers/LexerPython.py	Wed Apr 21 19:40:50 2021 +0200
@@ -181,14 +181,13 @@
                 if m:
                     last -= indent_width
         
-        if (
-            lead_spaces % indent_width != 0 or
-            lead_spaces == 0 or
-            self.lastIndented != line
-        ):
-            indentDifference = last - lead_spaces
-        else:
-            indentDifference = -indent_width
+        indentDifference = (
+            last - lead_spaces
+            if (lead_spaces % indent_width != 0 or
+                lead_spaces == 0 or
+                self.lastIndented != line) else
+            -indent_width
+        )
         
         return indentDifference
     

eric ide

mercurial