eric6/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py

changeset 7258
aff39db4dacc
parent 7229
53054eb5b15a
child 7360
9190402e4505
diff -r c4d0cac9b5c9 -r aff39db4dacc eric6/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py
--- a/eric6/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py	Sat Sep 21 22:03:03 2019 +0200
+++ b/eric6/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py	Mon Sep 23 19:10:42 2019 +0200
@@ -10,9 +10,10 @@
 
 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_QRegExpWizardCharactersDialog import Ui_QRegExpWizardCharactersDialog
 
@@ -661,8 +662,10 @@
         
         # character ranges
         for entrieslist in self.rangesEntries:
-            if not entrieslist[1].text() or \
-               not entrieslist[2].text():
+            if (
+                not entrieslist[1].text() or
+                not entrieslist[2].text()
+            ):
                 continue
             formatIdentifier = entrieslist[0].itemData(
                 entrieslist[0].currentIndex())
@@ -673,10 +676,12 @@
                 self.__formatCharacter(char2, formatIdentifier))
         
         if regexp:
-            if (regexp.startswith("\\") and
-                regexp.count("\\") == 1 and
-                "-" not in regexp) or \
-               len(regexp) == 1:
+            if (
+                (regexp.startswith("\\") and
+                 regexp.count("\\") == 1 and
+                 "-" not in regexp) or
+                len(regexp) == 1
+            ):
                 return regexp
             else:
                 return "[{0}]".format(regexp)

eric ide

mercurial