Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2847
1843ef6e2656
parent 3005
3953ddfb991d
child 3058
0a02c433f52d
diff -r 9986ec0e559a -r 10516539f238 Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py
--- a/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py	Fri Oct 18 23:00:41 2013 +0200
@@ -10,13 +10,16 @@
 from __future__ import unicode_literals    # __IGNORE_WARNING__
 
 from PyQt4.QtCore import QRegExp
-from PyQt4.QtGui import QSizePolicy, QSpacerItem, QWidget, QHBoxLayout, QLineEdit, \
-    QPushButton, QDialog, QScrollArea, QComboBox, QVBoxLayout, QRegExpValidator, QLabel
+from PyQt4.QtGui import QSizePolicy, QSpacerItem, QWidget, QHBoxLayout, \
+    QLineEdit, QPushButton, QDialog, QScrollArea, QComboBox, QVBoxLayout, \
+    QRegExpValidator, QLabel
 
-from .Ui_PyRegExpWizardCharactersDialog import Ui_PyRegExpWizardCharactersDialog
+from .Ui_PyRegExpWizardCharactersDialog import \
+    Ui_PyRegExpWizardCharactersDialog
 
 
-class PyRegExpWizardCharactersDialog(QDialog, Ui_PyRegExpWizardCharactersDialog):
+class PyRegExpWizardCharactersDialog(
+    QDialog, Ui_PyRegExpWizardCharactersDialog):
     """
     Class implementing a dialog for entering character classes.
     """
@@ -43,8 +46,10 @@
         self.comboItems = []
         self.singleComboItems = []      # these are in addition to the above
         self.comboItems.append(self.trUtf8("Normal character"))
-        self.comboItems.append(self.trUtf8("Unicode character in hexadecimal notation"))
-        self.comboItems.append(self.trUtf8("Unicode character in octal notation"))
+        self.comboItems.append(
+            self.trUtf8("Unicode character in hexadecimal notation"))
+        self.comboItems.append(
+            self.trUtf8("Unicode character in octal notation"))
         self.singleComboItems.append(self.trUtf8("---"))
         self.singleComboItems.append(self.trUtf8("Bell character (\\a)"))
         self.singleComboItems.append(self.trUtf8("Page break (\\f)"))
@@ -85,7 +90,8 @@
             self.singlesBox)
         self.moreSinglesButton.setObjectName("moreSinglesButton")
         hlayout0.addWidget(self.moreSinglesButton)
-        hspacer0 = QSpacerItem(30, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
+        hspacer0 = QSpacerItem(
+            30, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
         hlayout0.addItem(hspacer0)
         self.singlesBoxLayout.addLayout(hlayout0)
         self.moreSinglesButton.clicked[()].connect(self.__addSinglesLine)
@@ -118,7 +124,8 @@
             self.rangesBox)
         self.moreSinglesButton.setObjectName("moreRangesButton")
         hlayout1.addWidget(self.moreRangesButton)
-        hspacer1 = QSpacerItem(30, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
+        hspacer1 = QSpacerItem(
+            30, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
         hlayout1.addItem(hspacer1)
         self.rangesBoxLayout.addLayout(hlayout1)
         self.moreRangesButton.clicked[()].connect(self.__addRangesLine)
@@ -213,7 +220,8 @@
         
     def __singlesCharTypeSelected(self, index):
         """
-        Private slot to handle the activated(int) signal of the single chars combo boxes.
+        Private slot to handle the activated(int) signal of the single chars
+        combo boxes.
         
         @param index selected list index (integer)
         """
@@ -225,7 +233,8 @@
         
     def __rangesCharTypeSelected(self, index):
         """
-        Private slot to handle the activated(int) signal of the char ranges combo boxes.
+        Private slot to handle the activated(int) signal of the char ranges
+        combo boxes.
         
         @param index selected list index (integer)
         """
@@ -301,8 +310,9 @@
                 self.__formatCharacter(index, char2))
         
         if regexp:
-            if (len(regexp) == 2 and \
-                (regexp in self.predefinedClasses or regexp in self.specialChars)) or \
+            if (len(regexp) == 2 and
+                (regexp in self.predefinedClasses or
+                 regexp in self.specialChars)) or \
                len(regexp) == 1:
                 return regexp
             else:

eric ide

mercurial