diff -r e9e7eca7efee -r bf71ee032bb4 src/eric7/DataViews/PyCoverageJsonReportDialog.py --- a/src/eric7/DataViews/PyCoverageJsonReportDialog.py Wed Jul 13 11:16:20 2022 +0200 +++ b/src/eric7/DataViews/PyCoverageJsonReportDialog.py Wed Jul 13 14:55:47 2022 +0200 @@ -23,10 +23,11 @@ Class implementing a dialog to enter the parameters for a coverage JSON report. """ + def __init__(self, defaultDirectory, parent=None): """ Constructor - + @param defaultDirectory default directory for selecting the output directory @type str @@ -35,36 +36,36 @@ """ super().__init__(parent) self.setupUi(self) - + self.outputFilePicker.setMode( - EricPathPickerModes.SAVE_FILE_ENSURE_EXTENSION_MODE) + EricPathPickerModes.SAVE_FILE_ENSURE_EXTENSION_MODE + ) self.outputFilePicker.setDefaultDirectory(defaultDirectory) - self.outputFilePicker.setFilters( - self.tr("JSON Files (*.json);;All Files (*)")) - self.outputFilePicker.setText( - os.path.join(defaultDirectory, "coverage.json")) - + self.outputFilePicker.setFilters(self.tr("JSON Files (*.json);;All Files (*)")) + self.outputFilePicker.setText(os.path.join(defaultDirectory, "coverage.json")) + msh = self.minimumSizeHint() self.resize(max(self.width(), msh.width()), msh.height()) - + @pyqtSlot(str) def on_outputFilePicker_textChanged(self, filename): """ Private slot handling a change of the output file. - + @param filename current text of the file picker @type str """ - self.buttonBox.button( - QDialogButtonBox.StandardButton.Ok).setEnabled(bool(filename)) - + self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( + bool(filename) + ) + def getData(self): """ Public method to get the entered data. - + @return tuple containing the output file and a flag indicating the creation of a compact JSON file - + @rtype tuple of (str, bool) """ return (