src/eric7/QScintilla/Editor.py

branch
eric7
changeset 10069
435cc5875135
parent 10060
b946699e9e79
child 10079
0222a480e93d
child 10142
083fc88c9471
--- a/src/eric7/QScintilla/Editor.py	Thu May 25 11:12:05 2023 +0200
+++ b/src/eric7/QScintilla/Editor.py	Thu May 25 19:51:47 2023 +0200
@@ -144,7 +144,7 @@
     lastEditPositionAvailable = pyqtSignal()
     refreshed = pyqtSignal()
     settingsRead = pyqtSignal()
-    mouseDoubleClick = pyqtSignal(QPoint, int)
+    mouseDoubleClick = pyqtSignal(QPoint, Qt.MouseButton)
 
     WarningCode = 1
     WarningStyle = 2
@@ -2310,7 +2310,7 @@
             lineno = self.markerLine(self.lastHighlight)
             self.ensureVisible(lineno + 1)
 
-    def highlight(self, line=None, error=False, syntaxError=False):
+    def highlight(self, line=None, error=False, syntaxError=False):  # noqa: U100
         """
         Public method to highlight [or de-highlight] a particular line.
 
@@ -2357,16 +2357,16 @@
 
     def __modified(
         self,
-        pos,
+        pos,  # noqa: U100
         mtype,
-        text,
-        length,
+        text,  # noqa: U100
+        length,  # noqa: U100
         linesAdded,
         line,
-        foldNow,
-        foldPrev,
-        token,
-        annotationLinesAdded,
+        foldNow,  # noqa: U100
+        foldPrev,  # noqa: U100
+        token,  # noqa: U100
+        annotationLinesAdded,  # noqa: U100
     ):
         """
         Private method to handle changes of the number of lines.
@@ -3047,13 +3047,12 @@
     ## Change tracing methods below
     ###########################################################################
 
-    def __createChangeMarkerPixmap(self, key, size=16, width=4):
+    def __createChangeMarkerPixmap(self, key, size=16):
         """
         Private method to create a pixmap for the change markers.
 
         @param key key of the color to use (string)
         @param size size of the pixmap (integer)
-        @param width width of the marker line (integer)
         @return create pixmap (QPixmap)
         """
         pixmap = QPixmap(size, size)
@@ -3619,13 +3618,11 @@
             )
             return False
 
-    def saveFileAs(self, path=None, toProject=False):
+    def saveFileAs(self, path=None):
         """
         Public slot to save a file with a new name.
 
         @param path directory to save the file in (string)
-        @param toProject flag indicating a save to project operation
-            (boolean)
         @return tuple of two values (boolean, string) giving a success
             indicator and the name of the saved file
         """
@@ -3744,7 +3741,7 @@
                 QsciScintilla.SC_FOLDACTION_EXPAND,
             )
 
-    def __marginClicked(self, margin, line, modifiers):
+    def __marginClicked(self, margin, line, modifiers):  # noqa: U100
         """
         Private slot to handle the marginClicked signal.
 
@@ -6686,7 +6683,9 @@
     ## Warning handling methods below
     ###########################################################################
 
-    def toggleWarning(self, line, col, warning, msg="", warningType=WarningCode):
+    def toggleWarning(
+        self, line, col, warning, msg="", warningType=WarningCode  # noqa: U100
+    ):
         """
         Public method to toggle a warning indicator.
 
@@ -7223,7 +7222,7 @@
         self.undoAvailable.emit(self.isUndoAvailable())
         self.redoAvailable.emit(self.isRedoAvailable())
 
-    def close(self, alsoDelete=False):
+    def close(self):
         """
         Public method called when the window gets closed.
 
@@ -7231,7 +7230,6 @@
         ViewManager.closeEditor, which in turn calls our closeIt
         method.
 
-        @param alsoDelete ignored
         @return flag indicating a successful close of the editor (boolean)
         """
         return self.vm.closeEditor(self)
@@ -8033,9 +8031,9 @@
             # template viewer is not active
             return
 
-        if templateViewer.hasTemplate(templateName, self.getLanguage()):
+        if templateViewer.hasTemplate(templateName, language):
             self.extendSelectionWordLeft()
-            templateViewer.applyNamedTemplate(templateName, self.getLanguage())
+            templateViewer.applyNamedTemplate(templateName, language)
 
     #######################################################################
     ## Project related methods

eric ide

mercurial