Fixed a few code style issues related to the usage of class instances for default arguments.

Wed, 22 Mar 2017 19:59:45 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 22 Mar 2017 19:59:45 +0100
changeset 5653
c023821bb25f
parent 5652
d1b65f380408
child 5654
d75dfc0d10f2

Fixed a few code style issues related to the usage of class instances for default arguments.

APIs/Python3/eric6.api file | annotate | diff | comparison | revisions
Debugger/WatchPointViewer.py file | annotate | diff | comparison | revisions
Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Debugger.WatchPointViewer.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.E5Graphics.E5ArrowItem.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.E5Gui.E5FileDialog.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.E5Gui.E5MessageBox.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.E5Gui.E5ProgressDialog.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Helpviewer.ClosedTabsManager.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Preferences.ConfigurationPages.ConfigurationPageBase.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Snapshot.SnapshotFreehandGrabber.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Snapshot.SnapshotRegionGrabber.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.WebBrowser.ClosedTabsManager.html file | annotate | diff | comparison | revisions
E5Graphics/E5ArrowItem.py file | annotate | diff | comparison | revisions
E5Gui/E5FileDialog.py file | annotate | diff | comparison | revisions
E5Gui/E5MessageBox.py file | annotate | diff | comparison | revisions
E5Gui/E5ProgressDialog.py file | annotate | diff | comparison | revisions
Helpviewer/ClosedTabsManager.py file | annotate | diff | comparison | revisions
Preferences/ConfigurationPages/ConfigurationPageBase.py file | annotate | diff | comparison | revisions
Snapshot/SnapshotFreehandGrabber.py file | annotate | diff | comparison | revisions
Snapshot/SnapshotRegionGrabber.py file | annotate | diff | comparison | revisions
WebBrowser/ClosedTabsManager.py file | annotate | diff | comparison | revisions
eric6.e4p file | annotate | diff | comparison | revisions
--- a/APIs/Python3/eric6.api	Wed Mar 22 18:56:25 2017 +0100
+++ b/APIs/Python3/eric6.api	Wed Mar 22 19:59:45 2017 +0100
@@ -851,7 +851,7 @@
 eric6.E5Graphics.E5ArrowItem.E5ArrowItem.setEndPoint?4(x, y)
 eric6.E5Graphics.E5ArrowItem.E5ArrowItem.setPoints?4(xa, ya, xb, yb)
 eric6.E5Graphics.E5ArrowItem.E5ArrowItem.setStartPoint?4(x, y)
-eric6.E5Graphics.E5ArrowItem.E5ArrowItem?1(origin=QPointF(), end=QPointF(), filled=False, arrowType=NormalArrow, parent=None)
+eric6.E5Graphics.E5ArrowItem.E5ArrowItem?1(origin=None, end=None, filled=False, arrowType=NormalArrow, parent=None)
 eric6.E5Graphics.E5ArrowItem.NormalArrow?7
 eric6.E5Graphics.E5ArrowItem.WideArrow?7
 eric6.E5Graphics.E5GraphicsView.E5GraphicsView.ZoomLevelDefault?7
@@ -930,12 +930,12 @@
 eric6.E5Gui.E5FileDialog.ReadOnly?7
 eric6.E5Gui.E5FileDialog.ShowDirsOnly?7
 eric6.E5Gui.E5FileDialog.getExistingDirectory?4(parent=None, caption="", directory="", options=QFileDialog.ShowDirsOnly)
-eric6.E5Gui.E5FileDialog.getOpenFileName?4(parent=None, caption="", directory="", filterStr="", options=QFileDialog.Options())
-eric6.E5Gui.E5FileDialog.getOpenFileNameAndFilter?4(parent=None, caption="", directory="", filterStr="", initialFilter="", options=QFileDialog.Options())
-eric6.E5Gui.E5FileDialog.getOpenFileNames?4(parent=None, caption="", directory="", filterStr="", options=QFileDialog.Options())
-eric6.E5Gui.E5FileDialog.getOpenFileNamesAndFilter?4(parent=None, caption="", directory="", filterStr="", initialFilter="", options=QFileDialog.Options())
-eric6.E5Gui.E5FileDialog.getSaveFileName?4(parent=None, caption="", directory="", filterStr="", options=QFileDialog.Options())
-eric6.E5Gui.E5FileDialog.getSaveFileNameAndFilter?4(parent=None, caption="", directory="", filterStr="", initialFilter="", options=QFileDialog.Options())
+eric6.E5Gui.E5FileDialog.getOpenFileName?4(parent=None, caption="", directory="", filterStr="", options=None)
+eric6.E5Gui.E5FileDialog.getOpenFileNameAndFilter?4(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
+eric6.E5Gui.E5FileDialog.getOpenFileNames?4(parent=None, caption="", directory="", filterStr="", options=None)
+eric6.E5Gui.E5FileDialog.getOpenFileNamesAndFilter?4(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
+eric6.E5Gui.E5FileDialog.getSaveFileName?4(parent=None, caption="", directory="", filterStr="", options=None)
+eric6.E5Gui.E5FileDialog.getSaveFileNameAndFilter?4(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
 eric6.E5Gui.E5GenericDiffHighlighter.E5GenericDiffHighlighter.createRules?4(*rules)
 eric6.E5Gui.E5GenericDiffHighlighter.E5GenericDiffHighlighter.formats?4(line)
 eric6.E5Gui.E5GenericDiffHighlighter.E5GenericDiffHighlighter.generateRules?4()
@@ -1032,7 +1032,7 @@
 eric6.E5Gui.E5MessageBox.Critical?7
 eric6.E5Gui.E5MessageBox.DestructiveRole?7
 eric6.E5Gui.E5MessageBox.Discard?7
-eric6.E5Gui.E5MessageBox.E5MessageBox?1(icon, title, text, modal=False, buttons=QMessageBox.StandardButtons(QMessageBox.NoButton), parent=None)
+eric6.E5Gui.E5MessageBox.E5MessageBox?1(icon, title, text, modal=False, buttons=QMessageBox.NoButton, parent=None)
 eric6.E5Gui.E5MessageBox.Help?7
 eric6.E5Gui.E5MessageBox.HelpRole?7
 eric6.E5Gui.E5MessageBox.Ignore?7
@@ -1191,7 +1191,7 @@
 eric6.E5Gui.E5PathPicker.E5PathPickerModes.SaveFileOverwriteMode?7
 eric6.E5Gui.E5ProgressDialog.E5ProgressDialog.format?4()
 eric6.E5Gui.E5ProgressDialog.E5ProgressDialog.setFormat?4(labelFormat)
-eric6.E5Gui.E5ProgressDialog.E5ProgressDialog?1(labelText, cancelButtonText, minimum, maximum, labelFormat=None, parent=None, flags=Qt.WindowFlags())
+eric6.E5Gui.E5ProgressDialog.E5ProgressDialog?1(labelText, cancelButtonText, minimum, maximum, labelFormat=None, parent=None, flags=None)
 eric6.E5Gui.E5SideBar.E5SideBar.East?7
 eric6.E5Gui.E5SideBar.E5SideBar.North?7
 eric6.E5Gui.E5SideBar.E5SideBar.South?7
@@ -2118,7 +2118,7 @@
 eric6.Helpviewer.Bookmarks.XbelReader.XmlEntityResolver.resolveUndeclaredEntity?4(entity)
 eric6.Helpviewer.Bookmarks.XbelWriter.XbelWriter.write?4(fileNameOrDevice, root)
 eric6.Helpviewer.Bookmarks.XbelWriter.XbelWriter?1()
-eric6.Helpviewer.ClosedTabsManager.ClosedTab?1(url=QUrl(), title="", position=-1)
+eric6.Helpviewer.ClosedTabsManager.ClosedTab?1(url=None, title="", position=-1)
 eric6.Helpviewer.ClosedTabsManager.ClosedTabsManager.allClosedTabs?4()
 eric6.Helpviewer.ClosedTabsManager.ClosedTabsManager.clearList?4()
 eric6.Helpviewer.ClosedTabsManager.ClosedTabsManager.closedTabAvailable?7
@@ -6228,7 +6228,7 @@
 eric6.Preferences.ConfigurationPages.ConfigurationPageBase.ConfigurationPageBase.polishPage?4()
 eric6.Preferences.ConfigurationPages.ConfigurationPageBase.ConfigurationPageBase.saveColours?4(prefMethod)
 eric6.Preferences.ConfigurationPages.ConfigurationPageBase.ConfigurationPageBase.saveState?4()
-eric6.Preferences.ConfigurationPages.ConfigurationPageBase.ConfigurationPageBase.selectFont?4(fontSample, fontVar, showFontInfo=False, options=QFontDialog.FontDialogOptions(0))
+eric6.Preferences.ConfigurationPages.ConfigurationPageBase.ConfigurationPageBase.selectFont?4(fontSample, fontVar, showFontInfo=False, options=None)
 eric6.Preferences.ConfigurationPages.ConfigurationPageBase.ConfigurationPageBase.setState?4(state)
 eric6.Preferences.ConfigurationPages.ConfigurationPageBase.ConfigurationPageBase?1()
 eric6.Preferences.ConfigurationPages.CooperationPage.CooperationPage.on_addBannedUserButton_clicked?4()
@@ -8220,7 +8220,7 @@
 eric6.Snapshot.SnapshotFreehandGrabber.SnapshotFreehandGrabber.mouseReleaseEvent?4(evt)
 eric6.Snapshot.SnapshotFreehandGrabber.SnapshotFreehandGrabber.paintEvent?4(evt)
 eric6.Snapshot.SnapshotFreehandGrabber.SnapshotFreehandGrabber?1()
-eric6.Snapshot.SnapshotFreehandGrabber.drawPolygon?4(painter, polygon, outline, fill=QColor())
+eric6.Snapshot.SnapshotFreehandGrabber.drawPolygon?4(painter, polygon, outline, fill=None)
 eric6.Snapshot.SnapshotPreview.SnapshotPreview.mouseMoveEvent?4(evt)
 eric6.Snapshot.SnapshotPreview.SnapshotPreview.mousePressEvent?4(evt)
 eric6.Snapshot.SnapshotPreview.SnapshotPreview.mouseReleaseEvent?4(evt)
@@ -8240,7 +8240,7 @@
 eric6.Snapshot.SnapshotRegionGrabber.SnapshotRegionGrabber.paintEvent?4(evt)
 eric6.Snapshot.SnapshotRegionGrabber.SnapshotRegionGrabber.resizeEvent?4(evt)
 eric6.Snapshot.SnapshotRegionGrabber.SnapshotRegionGrabber?1(mode=Rectangle)
-eric6.Snapshot.SnapshotRegionGrabber.drawRect?4(painter, rect, outline, fill=QColor())
+eric6.Snapshot.SnapshotRegionGrabber.drawRect?4(painter, rect, outline, fill=None)
 eric6.Snapshot.SnapshotTimer.SnapshotTimer.enterEvent?4(evt)
 eric6.Snapshot.SnapshotTimer.SnapshotTimer.paintEvent?4(evt)
 eric6.Snapshot.SnapshotTimer.SnapshotTimer.start?4(seconds)
@@ -9829,7 +9829,7 @@
 eric6.WebBrowser.Bookmarks.XbelReader.XmlEntityResolver.resolveUndeclaredEntity?4(entity)
 eric6.WebBrowser.Bookmarks.XbelWriter.XbelWriter.write?4(fileNameOrDevice, root)
 eric6.WebBrowser.Bookmarks.XbelWriter.XbelWriter?1()
-eric6.WebBrowser.ClosedTabsManager.ClosedTab?1(url=QUrl(), title="", position=-1)
+eric6.WebBrowser.ClosedTabsManager.ClosedTab?1(url=None, title="", position=-1)
 eric6.WebBrowser.ClosedTabsManager.ClosedTabsManager.allClosedTabs?4()
 eric6.WebBrowser.ClosedTabsManager.ClosedTabsManager.clearList?4()
 eric6.WebBrowser.ClosedTabsManager.ClosedTabsManager.closedTabAvailable?7
--- a/Debugger/WatchPointViewer.py	Wed Mar 22 18:56:25 2017 +0100
+++ b/Debugger/WatchPointViewer.py	Wed Mar 22 19:59:45 2017 +0100
@@ -221,7 +221,7 @@
             self.__setRowSelected(index, False)
     
     def __findDuplicates(self, cond, special, showMessage=False,
-                         index=QModelIndex()):
+                         index=None):
         """
         Private method to check, if an entry already exists.
         
@@ -233,6 +233,8 @@
             (QModelIndex)
         @return flag indicating a duplicate entry (boolean)
         """
+        if index is None:
+            index = QModelIndex()
         idx = self.__model.getWatchPointIndex(cond, special)
         duplicate = idx.isValid() and \
             idx.internalPointer() != index.internalPointer()
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Source/eric6.Debugger.WatchPointViewer.html	Wed Mar 22 18:56:25 2017 +0100
+++ b/Documentation/Source/eric6.Debugger.WatchPointViewer.html	Wed Mar 22 19:59:45 2017 +0100
@@ -260,7 +260,7 @@
         Private slot to handle the enable watch expression context menu entry.
 </p><a NAME="WatchPointViewer.__findDuplicates" ID="WatchPointViewer.__findDuplicates"></a>
 <h4>WatchPointViewer.__findDuplicates</h4>
-<b>__findDuplicates</b>(<i>cond, special, showMessage=False, index=QModelIndex()</i>)
+<b>__findDuplicates</b>(<i>cond, special, showMessage=False, index=None</i>)
 <p>
         Private method to check, if an entry already exists.
 </p><dl>
--- a/Documentation/Source/eric6.E5Graphics.E5ArrowItem.html	Wed Mar 22 18:56:25 2017 +0100
+++ b/Documentation/Source/eric6.E5Graphics.E5ArrowItem.html	Wed Mar 22 19:59:45 2017 +0100
@@ -82,7 +82,7 @@
 </table>
 <a NAME="E5ArrowItem.__init__" ID="E5ArrowItem.__init__"></a>
 <h4>E5ArrowItem (Constructor)</h4>
-<b>E5ArrowItem</b>(<i>origin=QPointF(), end=QPointF(), filled=False, arrowType=NormalArrow, parent=None</i>)
+<b>E5ArrowItem</b>(<i>origin=None, end=None, filled=False, arrowType=NormalArrow, parent=None</i>)
 <p>
         Constructor
 </p><dl>
--- a/Documentation/Source/eric6.E5Gui.E5FileDialog.html	Wed Mar 22 18:56:25 2017 +0100
+++ b/Documentation/Source/eric6.E5Gui.E5FileDialog.html	Wed Mar 22 19:59:45 2017 +0100
@@ -112,7 +112,7 @@
 <hr /><hr />
 <a NAME="getOpenFileName" ID="getOpenFileName"></a>
 <h2>getOpenFileName</h2>
-<b>getOpenFileName</b>(<i>parent=None, caption="", directory="", filterStr="", options=QFileDialog.Options()</i>)
+<b>getOpenFileName</b>(<i>parent=None, caption="", directory="", filterStr="", options=None</i>)
 <p>
     Module function to get the name of a file for opening it.
 </p><dl>
@@ -142,7 +142,7 @@
 <hr /><hr />
 <a NAME="getOpenFileNameAndFilter" ID="getOpenFileNameAndFilter"></a>
 <h2>getOpenFileNameAndFilter</h2>
-<b>getOpenFileNameAndFilter</b>(<i>parent=None, caption="", directory="", filterStr="", initialFilter="", options=QFileDialog.Options()</i>)
+<b>getOpenFileNameAndFilter</b>(<i>parent=None, caption="", directory="", filterStr="", initialFilter="", options=None</i>)
 <p>
     Module function to get the name of a file for opening it and the selected
     file name filter.
@@ -176,7 +176,7 @@
 <hr /><hr />
 <a NAME="getOpenFileNames" ID="getOpenFileNames"></a>
 <h2>getOpenFileNames</h2>
-<b>getOpenFileNames</b>(<i>parent=None, caption="", directory="", filterStr="", options=QFileDialog.Options()</i>)
+<b>getOpenFileNames</b>(<i>parent=None, caption="", directory="", filterStr="", options=None</i>)
 <p>
     Module function to get a list of names of files for opening.
 </p><dl>
@@ -206,7 +206,7 @@
 <hr /><hr />
 <a NAME="getOpenFileNamesAndFilter" ID="getOpenFileNamesAndFilter"></a>
 <h2>getOpenFileNamesAndFilter</h2>
-<b>getOpenFileNamesAndFilter</b>(<i>parent=None, caption="", directory="", filterStr="", initialFilter="", options=QFileDialog.Options()</i>)
+<b>getOpenFileNamesAndFilter</b>(<i>parent=None, caption="", directory="", filterStr="", initialFilter="", options=None</i>)
 <p>
     Module function to get a list of names of files for opening and the
     selected file name filter.
@@ -241,7 +241,7 @@
 <hr /><hr />
 <a NAME="getSaveFileName" ID="getSaveFileName"></a>
 <h2>getSaveFileName</h2>
-<b>getSaveFileName</b>(<i>parent=None, caption="", directory="", filterStr="", options=QFileDialog.Options()</i>)
+<b>getSaveFileName</b>(<i>parent=None, caption="", directory="", filterStr="", options=None</i>)
 <p>
     Module function to get the name of a file for saving it.
 </p><dl>
@@ -271,7 +271,7 @@
 <hr /><hr />
 <a NAME="getSaveFileNameAndFilter" ID="getSaveFileNameAndFilter"></a>
 <h2>getSaveFileNameAndFilter</h2>
-<b>getSaveFileNameAndFilter</b>(<i>parent=None, caption="", directory="", filterStr="", initialFilter="", options=QFileDialog.Options()</i>)
+<b>getSaveFileNameAndFilter</b>(<i>parent=None, caption="", directory="", filterStr="", initialFilter="", options=None</i>)
 <p>
     Module function to get the name of a file for saving it and the selected
     file name filter.
--- a/Documentation/Source/eric6.E5Gui.E5MessageBox.html	Wed Mar 22 18:56:25 2017 +0100
+++ b/Documentation/Source/eric6.E5Gui.E5MessageBox.html	Wed Mar 22 19:59:45 2017 +0100
@@ -91,7 +91,7 @@
 </table>
 <a NAME="E5MessageBox.__init__" ID="E5MessageBox.__init__"></a>
 <h4>E5MessageBox (Constructor)</h4>
-<b>E5MessageBox</b>(<i>icon, title, text, modal=False, buttons=QMessageBox.StandardButtons(QMessageBox.NoButton), parent=None</i>)
+<b>E5MessageBox</b>(<i>icon, title, text, modal=False, buttons=QMessageBox.NoButton, parent=None</i>)
 <p>
         Constructor
 </p><dl>
--- a/Documentation/Source/eric6.E5Gui.E5ProgressDialog.html	Wed Mar 22 18:56:25 2017 +0100
+++ b/Documentation/Source/eric6.E5Gui.E5ProgressDialog.html	Wed Mar 22 19:59:45 2017 +0100
@@ -74,7 +74,7 @@
 </table>
 <a NAME="E5ProgressDialog.__init__" ID="E5ProgressDialog.__init__"></a>
 <h4>E5ProgressDialog (Constructor)</h4>
-<b>E5ProgressDialog</b>(<i>labelText, cancelButtonText, minimum, maximum, labelFormat=None, parent=None, flags=Qt.WindowFlags()</i>)
+<b>E5ProgressDialog</b>(<i>labelText, cancelButtonText, minimum, maximum, labelFormat=None, parent=None, flags=None</i>)
 <p>
         Constructor
 </p><dl>
--- a/Documentation/Source/eric6.Helpviewer.ClosedTabsManager.html	Wed Mar 22 18:56:25 2017 +0100
+++ b/Documentation/Source/eric6.Helpviewer.ClosedTabsManager.html	Wed Mar 22 19:59:45 2017 +0100
@@ -73,7 +73,7 @@
 </table>
 <a NAME="ClosedTab.__init__" ID="ClosedTab.__init__"></a>
 <h4>ClosedTab (Constructor)</h4>
-<b>ClosedTab</b>(<i>url=QUrl(), title="", position=-1</i>)
+<b>ClosedTab</b>(<i>url=None, title="", position=-1</i>)
 <p>
         Constructor
 </p><dl>
--- a/Documentation/Source/eric6.Preferences.ConfigurationPages.ConfigurationPageBase.html	Wed Mar 22 18:56:25 2017 +0100
+++ b/Documentation/Source/eric6.Preferences.ConfigurationPages.ConfigurationPageBase.html	Wed Mar 22 19:59:45 2017 +0100
@@ -141,7 +141,7 @@
         Public method to save the current state of the widget.
 </p><a NAME="ConfigurationPageBase.selectFont" ID="ConfigurationPageBase.selectFont"></a>
 <h4>ConfigurationPageBase.selectFont</h4>
-<b>selectFont</b>(<i>fontSample, fontVar, showFontInfo=False, options=QFontDialog.FontDialogOptions(0)</i>)
+<b>selectFont</b>(<i>fontSample, fontVar, showFontInfo=False, options=None</i>)
 <p>
         Public method used by the font selection buttons.
 </p><dl>
--- a/Documentation/Source/eric6.Snapshot.SnapshotFreehandGrabber.html	Wed Mar 22 18:56:25 2017 +0100
+++ b/Documentation/Source/eric6.Snapshot.SnapshotFreehandGrabber.html	Wed Mar 22 19:59:45 2017 +0100
@@ -178,7 +178,7 @@
 <hr /><hr />
 <a NAME="drawPolygon" ID="drawPolygon"></a>
 <h2>drawPolygon</h2>
-<b>drawPolygon</b>(<i>painter, polygon, outline, fill=QColor()</i>)
+<b>drawPolygon</b>(<i>painter, polygon, outline, fill=None</i>)
 <p>
     Module function to draw a polygon with the given parameters.
 </p><dl>
--- a/Documentation/Source/eric6.Snapshot.SnapshotRegionGrabber.html	Wed Mar 22 18:56:25 2017 +0100
+++ b/Documentation/Source/eric6.Snapshot.SnapshotRegionGrabber.html	Wed Mar 22 19:59:45 2017 +0100
@@ -264,7 +264,7 @@
 <hr /><hr />
 <a NAME="drawRect" ID="drawRect"></a>
 <h2>drawRect</h2>
-<b>drawRect</b>(<i>painter, rect, outline, fill=QColor()</i>)
+<b>drawRect</b>(<i>painter, rect, outline, fill=None</i>)
 <p>
     Module function to draw a rectangle with the given parameters.
 </p><dl>
--- a/Documentation/Source/eric6.WebBrowser.ClosedTabsManager.html	Wed Mar 22 18:56:25 2017 +0100
+++ b/Documentation/Source/eric6.WebBrowser.ClosedTabsManager.html	Wed Mar 22 19:59:45 2017 +0100
@@ -73,7 +73,7 @@
 </table>
 <a NAME="ClosedTab.__init__" ID="ClosedTab.__init__"></a>
 <h4>ClosedTab (Constructor)</h4>
-<b>ClosedTab</b>(<i>url=QUrl(), title="", position=-1</i>)
+<b>ClosedTab</b>(<i>url=None, title="", position=-1</i>)
 <p>
         Constructor
 </p><dl>
--- a/E5Graphics/E5ArrowItem.py	Wed Mar 22 18:56:25 2017 +0100
+++ b/E5Graphics/E5ArrowItem.py	Wed Mar 22 19:59:45 2017 +0100
@@ -26,7 +26,7 @@
     """
     Class implementing an arrow graphics item subclass.
     """
-    def __init__(self, origin=QPointF(), end=QPointF(),
+    def __init__(self, origin=None, end=None,
                  filled=False, arrowType=NormalArrow, parent=None):
         """
         Constructor
@@ -39,8 +39,8 @@
         """
         super(E5ArrowItem, self).__init__(parent)
         
-        self._origin = origin
-        self._end = end
+        self._origin = QPointF() if origin is None else QPointF(origin)
+        self._end = QPointF() if end is None else QPointF(end)
         self._filled = filled
         self._type = arrowType
         
--- a/E5Gui/E5FileDialog.py	Wed Mar 22 18:56:25 2017 +0100
+++ b/E5Gui/E5FileDialog.py	Wed Mar 22 19:59:45 2017 +0100
@@ -47,7 +47,7 @@
 
 
 def getOpenFileName(parent=None, caption="", directory="",
-                    filterStr="", options=QFileDialog.Options()):
+                    filterStr="", options=None):
     """
     Module function to get the name of a file for opening it.
     
@@ -58,6 +58,8 @@
     @param options various options for the dialog (QFileDialog.Options)
     @return name of file to be opened (string)
     """
+    if options is None:
+        options = QFileDialog.Options()
     if Globals.isLinuxPlatform():
         options |= QFileDialog.DontUseNativeDialog
     if PYQT_VERSION_STR >= "5.0.0":
@@ -70,7 +72,7 @@
 
 def getOpenFileNameAndFilter(parent=None, caption="", directory="",
                              filterStr="", initialFilter="",
-                             options=QFileDialog.Options()):
+                             options=None):
     """
     Module function to get the name of a file for opening it and the selected
     file name filter.
@@ -83,6 +85,8 @@
     @param options various options for the dialog (QFileDialog.Options)
     @return name of file to be opened and selected filter (string, string)
     """
+    if options is None:
+        options = QFileDialog.Options()
     if Globals.isLinuxPlatform():
         options |= QFileDialog.DontUseNativeDialog
     newfilter = __reorderFilter(filterStr, initialFilter)
@@ -95,7 +99,7 @@
 
 
 def getOpenFileNames(parent=None, caption="", directory="",
-                     filterStr="", options=QFileDialog.Options()):
+                     filterStr="", options=None):
     """
     Module function to get a list of names of files for opening.
     
@@ -106,6 +110,8 @@
     @param options various options for the dialog (QFileDialog.Options)
     @return list of file names to be opened (list of string)
     """
+    if options is None:
+        options = QFileDialog.Options()
     if Globals.isLinuxPlatform():
         options |= QFileDialog.DontUseNativeDialog
     if PYQT_VERSION_STR >= "5.0.0":
@@ -118,7 +124,7 @@
 
 def getOpenFileNamesAndFilter(parent=None, caption="", directory="",
                               filterStr="", initialFilter="",
-                              options=QFileDialog.Options()):
+                              options=None):
     """
     Module function to get a list of names of files for opening and the
     selected file name filter.
@@ -132,6 +138,8 @@
     @return list of file names to be opened and selected filter
         (list of string, string)
     """
+    if options is None:
+        options = QFileDialog.Options()
     if Globals.isLinuxPlatform():
         options |= QFileDialog.DontUseNativeDialog
     newfilter = __reorderFilter(filterStr, initialFilter)
@@ -144,7 +152,7 @@
 
 
 def getSaveFileName(parent=None, caption="", directory="",
-                    filterStr="", options=QFileDialog.Options()):
+                    filterStr="", options=None):
     """
     Module function to get the name of a file for saving it.
     
@@ -155,6 +163,8 @@
     @param options various options for the dialog (QFileDialog.Options)
     @return name of file to be saved (string)
     """
+    if options is None:
+        options = QFileDialog.Options()
     if Globals.isLinuxPlatform():
         options |= QFileDialog.DontUseNativeDialog
     if PYQT_VERSION_STR >= "5.0.0":
@@ -167,7 +177,7 @@
 
 def getSaveFileNameAndFilter(parent=None, caption="", directory="",
                              filterStr="", initialFilter="",
-                             options=QFileDialog.Options()):
+                             options=None):
     """
     Module function to get the name of a file for saving it and the selected
     file name filter.
@@ -180,6 +190,8 @@
     @param options various options for the dialog (QFileDialog.Options)
     @return name of file to be saved and selected filter (string, string)
     """
+    if options is None:
+        options = QFileDialog.Options()
     if Globals.isLinuxPlatform():
         options |= QFileDialog.DontUseNativeDialog
     newfilter = __reorderFilter(filterStr, initialFilter)
--- a/E5Gui/E5MessageBox.py	Wed Mar 22 18:56:25 2017 +0100
+++ b/E5Gui/E5MessageBox.py	Wed Mar 22 19:59:45 2017 +0100
@@ -68,7 +68,7 @@
     Class implementing a replacement for QMessageBox.
     """
     def __init__(self, icon, title, text, modal=False,
-                 buttons=QMessageBox.StandardButtons(QMessageBox.NoButton),
+                 buttons=QMessageBox.NoButton,
                  parent=None):
         """
         Constructor
--- a/E5Gui/E5ProgressDialog.py	Wed Mar 22 18:56:25 2017 +0100
+++ b/E5Gui/E5ProgressDialog.py	Wed Mar 22 19:59:45 2017 +0100
@@ -19,7 +19,7 @@
     label.
     """
     def __init__(self, labelText, cancelButtonText, minimum, maximum,
-                 labelFormat=None, parent=None, flags=Qt.WindowFlags()):
+                 labelFormat=None, parent=None, flags=None):
         """
         Constructor
         
@@ -31,6 +31,8 @@
         @keyparam parent reference to the parent widget (QWidget)
         @keyparam flags window flags of the dialog (Qt.WindowFlags)
         """
+        if flags is None:
+            flags = Qt.WindowFlags()
         super(E5ProgressDialog, self).__init__(
             labelText, cancelButtonText, minimum, maximum, parent, flags)
         
--- a/Helpviewer/ClosedTabsManager.py	Wed Mar 22 18:56:25 2017 +0100
+++ b/Helpviewer/ClosedTabsManager.py	Wed Mar 22 19:59:45 2017 +0100
@@ -17,7 +17,7 @@
     """
     Class implementing a structure to store data about a closed tab.
     """
-    def __init__(self, url=QUrl(), title="", position=-1):
+    def __init__(self, url=None, title="", position=-1):
         """
         Constructor
         
@@ -25,7 +25,7 @@
         @param title title of the closed tab (string)
         @param position index of the closed tab (integer)
         """
-        self.url = url
+        self.url = QUrl() if url is None else QUrl(url)
         self.title = title
         self.position = position
     
--- a/Preferences/ConfigurationPages/ConfigurationPageBase.py	Wed Mar 22 18:56:25 2017 +0100
+++ b/Preferences/ConfigurationPages/ConfigurationPageBase.py	Wed Mar 22 19:59:45 2017 +0100
@@ -105,7 +105,7 @@
                 prefMethod(key, self.__coloursDict[key][0])
         
     def selectFont(self, fontSample, fontVar, showFontInfo=False,
-                   options=QFontDialog.FontDialogOptions(0)):
+                   options=None):
         """
         Public method used by the font selection buttons.
         
@@ -117,6 +117,8 @@
             (QFontDialog.FontDialogOptions)
         @return selected font (QFont)
         """
+        if options is None:
+            options = QFontDialog.FontDialogOptions(0)
         font, ok = QFontDialog.getFont(fontVar, self, "", options)
         if ok:
             fontSample.setFont(font)
--- a/Snapshot/SnapshotFreehandGrabber.py	Wed Mar 22 18:56:25 2017 +0100
+++ b/Snapshot/SnapshotFreehandGrabber.py	Wed Mar 22 19:59:45 2017 +0100
@@ -16,7 +16,7 @@
 from PyQt5.QtWidgets import QWidget, QApplication, QToolTip
 
 
-def drawPolygon(painter, polygon, outline, fill=QColor()):
+def drawPolygon(painter, polygon, outline, fill=None):
     """
     Module function to draw a polygon with the given parameters.
     
@@ -35,7 +35,7 @@
     painter.drawPolygon(QPolygon(polygon))
     if fill.isValid():
         painter.setClipping(False)
-        painter.setBrush(fill)
+        painter.setBrush(fill or QColor())
         painter.drawPolygon(QPolygon(polygon))
     painter.restore()
 
--- a/Snapshot/SnapshotRegionGrabber.py	Wed Mar 22 18:56:25 2017 +0100
+++ b/Snapshot/SnapshotRegionGrabber.py	Wed Mar 22 19:59:45 2017 +0100
@@ -16,7 +16,7 @@
 from PyQt5.QtWidgets import QWidget, QApplication, QToolTip
 
 
-def drawRect(painter, rect, outline, fill=QColor()):
+def drawRect(painter, rect, outline, fill=None):
     """
     Module function to draw a rectangle with the given parameters.
     
@@ -35,7 +35,7 @@
     painter.drawRect(rect)
     if fill.isValid():
         painter.setClipping(False)
-        painter.setBrush(fill)
+        painter.setBrush(fill or QColor())
         painter.drawRect(rect.adjusted(1, 1, -1, -1))
     painter.restore()
 
--- a/WebBrowser/ClosedTabsManager.py	Wed Mar 22 18:56:25 2017 +0100
+++ b/WebBrowser/ClosedTabsManager.py	Wed Mar 22 19:59:45 2017 +0100
@@ -16,7 +16,7 @@
     """
     Class implementing a structure to store data about a closed tab.
     """
-    def __init__(self, url=QUrl(), title="", position=-1):
+    def __init__(self, url=None, title="", position=-1):
         """
         Constructor
         
@@ -24,7 +24,7 @@
         @param title title of the closed tab (string)
         @param position index of the closed tab (integer)
         """
-        self.url = url
+        self.url = QUrl() if url is None else QUrl(url)
         self.title = title
         self.position = position
     
--- a/eric6.e4p	Wed Mar 22 18:56:25 2017 +0100
+++ b/eric6.e4p	Wed Mar 22 19:59:45 2017 +0100
@@ -1958,14 +1958,14 @@
   <Interfaces/>
   <Others>
     <Other>.hgignore</Other>
+    <Other>APIs/Python/zope-2.10.7.api</Other>
+    <Other>APIs/Python/zope-2.11.2.api</Other>
+    <Other>APIs/Python/zope-3.3.1.api</Other>
     <Other>APIs/Python3/PyQt4.bas</Other>
     <Other>APIs/Python3/PyQt5.bas</Other>
     <Other>APIs/Python3/QScintilla2.bas</Other>
     <Other>APIs/Python3/eric6.api</Other>
     <Other>APIs/Python3/eric6.bas</Other>
-    <Other>APIs/Python/zope-2.10.7.api</Other>
-    <Other>APIs/Python/zope-2.11.2.api</Other>
-    <Other>APIs/Python/zope-3.3.1.api</Other>
     <Other>APIs/QSS/qss.api</Other>
     <Other>APIs/Ruby/Ruby-1.8.7.api</Other>
     <Other>APIs/Ruby/Ruby-1.8.7.bas</Other>
@@ -2522,7 +2522,7 @@
               <string>ExcludeMessages</string>
             </key>
             <value>
-              <string>C101, E265, E266, E305, E402, M811, M822, N802, N803, N807, N808, N821, W293</string>
+              <string>C101, E265, E266, E305, E402, M811, N802, N803, N807, N808, N821, W293</string>
             </value>
             <key>
               <string>FixCodes</string>

eric ide

mercurial