--- a/ProjectDjangoTagsMenu/IeCommentDialog.py Sat May 29 15:04:13 2021 +0200 +++ b/ProjectDjangoTagsMenu/IeCommentDialog.py Sun May 30 11:51:44 2021 +0200 @@ -7,7 +7,7 @@ Module implementing a dialog to enter data for an IE comment. """ -from PyQt5.QtWidgets import QDialog +from PyQt6.QtWidgets import QDialog from .Ui_IeCommentDialog import Ui_IeCommentDialog @@ -20,7 +20,8 @@ """ Constructor - @param parent reference to the parent widget (QWidget) + @param parent reference to the parent widget + @type QWidget """ super().__init__(parent) self.setupUi(self) @@ -36,7 +37,8 @@ """ Public method to retrieve the entered data. - @return tuple of condition (string) and version (integer) + @return tuple of condition and version + @rtype tuple of (str, int) """ return (self.conditionalComboBox.itemData( self.conditionalComboBox.currentIndex()), @@ -47,12 +49,13 @@ """ Public static method to get the formatted tag. - @param selectedText selected text to embed (string) - @return formatted tag (string) and a flag indicating the acceptance - state (boolean) + @param selectedText selected text to embed + @type str + @return formatted tag and a flag indicating the acceptance state + @rtype tuple of (str, bool) """ dlg = IeCommentDialog() - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: condition, version = dlg.getData() tag = '[if{0} IE {1}]> {2} <![endif]'.format( condition, version, selectedText)