eric6/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py

changeset 7258
aff39db4dacc
parent 7229
53054eb5b15a
child 7360
9190402e4505
--- a/eric6/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py	Sat Sep 21 22:03:03 2019 +0200
+++ b/eric6/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py	Mon Sep 23 19:10:42 2019 +0200
@@ -10,12 +10,14 @@
 
 from PyQt5.QtCore import QRegExp
 from PyQt5.QtGui import QRegExpValidator
-from PyQt5.QtWidgets import QSizePolicy, QSpacerItem, QWidget, QHBoxLayout, \
-    QLineEdit, QPushButton, QDialog, QScrollArea, QComboBox, QVBoxLayout, \
-    QLabel
+from PyQt5.QtWidgets import (
+    QSizePolicy, QSpacerItem, QWidget, QHBoxLayout, QLineEdit, QPushButton,
+    QDialog, QScrollArea, QComboBox, QVBoxLayout, QLabel
+)
 
-from .Ui_PyRegExpWizardCharactersDialog import \
+from .Ui_PyRegExpWizardCharactersDialog import (
     Ui_PyRegExpWizardCharactersDialog
+)
 
 
 class PyRegExpWizardCharactersDialog(
@@ -306,8 +308,10 @@
         
         # character ranges
         for entrieslist in self.rangesEntries:
-            if entrieslist[1].text() == "" or \
-               entrieslist[2].text() == "":
+            if (
+                entrieslist[1].text() == "" or
+                entrieslist[2].text() == ""
+            ):
                 continue
             index = entrieslist[0].currentIndex()
             char1 = entrieslist[1].text()
@@ -317,10 +321,12 @@
                 self.__formatCharacter(index, char2))
         
         if regexp:
-            if (len(regexp) == 2 and
-                (regexp in self.predefinedClasses or
-                 regexp in self.specialChars)) or \
-               len(regexp) == 1:
+            if (
+                (len(regexp) == 2 and
+                 (regexp in self.predefinedClasses or
+                  regexp in self.specialChars)) or
+                len(regexp) == 1
+            ):
                 return regexp
             else:
                 return "[{0}]".format(regexp)

eric ide

mercurial