Tue, 10 Jan 2017 19:23:25 +0100
Fixed some code style issues.
--- a/QScintilla/EditorButtonsWidget.py Tue Jan 10 19:15:17 2017 +0100 +++ b/QScintilla/EditorButtonsWidget.py Tue Jan 10 19:23:25 2017 +0100 @@ -340,7 +340,9 @@ if self.__provider: self.__buttons["quote"].setEnabled( self.__provider.hasQuote() and ( - self.__provider.kind() == "html" or hasSelection)) + self.__provider.kind() == "html" or hasSelection + ) + ) self.__buttons["hyperlink"].setEnabled( self.__provider.hasHyperlink() and not hasSelection) self.__buttons["line"].setEnabled(
--- a/QScintilla/MarkupProviders/HtmlProvider.py Tue Jan 10 19:15:17 2017 +0100 +++ b/QScintilla/MarkupProviders/HtmlProvider.py Tue Jan 10 19:23:25 2017 +0100 @@ -217,7 +217,7 @@ from .HyperlinkMarkupDialog import HyperlinkMarkupDialog dlg = HyperlinkMarkupDialog(True, False) if dlg.exec_() == QDialog.Accepted: - text, target, title = dlg.getData() + text, target, title = dlg.getData() if not text: text = target
--- a/QScintilla/MarkupProviders/HyperlinkMarkupDialog.py Tue Jan 10 19:15:17 2017 +0100 +++ b/QScintilla/MarkupProviders/HyperlinkMarkupDialog.py Tue Jan 10 19:23:25 2017 +0100 @@ -7,6 +7,8 @@ Module implementing a dialog to enter data to insert a hyperlink. """ +from __future__ import unicode_literals + from PyQt5.QtCore import pyqtSlot from PyQt5.QtWidgets import QDialog, QDialogButtonBox @@ -51,7 +53,7 @@ Private method to update the state of the OK button. """ self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( - (bool(self.textEdit.text()) or self.__allowEmptyText) and + (bool(self.textEdit.text()) or self.__allowEmptyText) and (bool(self.targetEdit.text()) or self.__allowEmptyTarget) ) @@ -66,7 +68,7 @@ self.__updateOkButton() @pyqtSlot(str) - def on_targetEdit_textChanged(self, tyt): + def on_targetEdit_textChanged(self, txt): """ Private slot handling a change of the link target.
--- a/QScintilla/MarkupProviders/ImageMarkupDialog.py Tue Jan 10 19:15:17 2017 +0100 +++ b/QScintilla/MarkupProviders/ImageMarkupDialog.py Tue Jan 10 19:23:25 2017 +0100 @@ -30,6 +30,8 @@ """ Constructor + @param mode mode of the dialog + @type int @param parent reference to the parent widget @type QWidget """ @@ -153,7 +155,7 @@ @pyqtSlot(bool) def on_sizeCheckBox_toggled(self, checked): """ - Public slot to reset the width and height spin boxes. + Private slot to reset the width and height spin boxes. @param checked flag indicating the state of the check box @type bool @@ -165,7 +167,7 @@ @pyqtSlot(bool) def on_aspectRatioCheckBox_toggled(self, checked): """ - Public slot to adjust the height to match the original aspect ratio. + Private slot to adjust the height to match the original aspect ratio. @param checked flag indicating the state of the check box @type bool
--- a/QScintilla/MarkupProviders/RestructuredTextProvider.py Tue Jan 10 19:15:17 2017 +0100 +++ b/QScintilla/MarkupProviders/RestructuredTextProvider.py Tue Jan 10 19:23:25 2017 +0100 @@ -209,7 +209,7 @@ from .HyperlinkMarkupDialog import HyperlinkMarkupDialog dlg = HyperlinkMarkupDialog(False, True, noTitle=True) if dlg.exec_() == QDialog.Accepted: - text, target, _ = dlg.getData() + text, target, _ = dlg.getData() link1 = "`{0}`_".format(text) link2 = ".. _`{0}`:".format(text) @@ -238,7 +238,6 @@ if not editor.text(line).startswith(".. _"): break line += 1 - print("x", editor.text(line), "x") if editor.text(line).strip(): sep = 2 * lineSeparator else: