What is the bug or the crash?
See both doc for QgsLayoutExporter.exportToPdf(): https://qgis.org/pyqgis/master/core/QgsLayoutExporter.html#qgis.core.QgsLayoutExporter.exportToPdf
If no iterator is passed, the return value of QgsLayoutExporter.exportToPdf() is a member of QgsLayoutExporter.ExportResult and in case of error, error is not returned
but if an iterator is passed, the return value is a tuple (int / QgsLayoutExporter.ExportResult, str)
By consistency, it would be worth to return QgsLayoutExporter.ExportResult in both cases or a tuple but mixed type is confusing
Steps to reproduce the issue
.
Versions
3.42.3 but doc of 3.42.3 and master is the same.
Supported QGIS version
New profile
Additional context
No response
What is the bug or the crash?
See both doc for
QgsLayoutExporter.exportToPdf(): https://qgis.org/pyqgis/master/core/QgsLayoutExporter.html#qgis.core.QgsLayoutExporter.exportToPdfIf no iterator is passed, the return value of
QgsLayoutExporter.exportToPdf()is a member ofQgsLayoutExporter.ExportResultand in case of error,erroris not returnedbut if an iterator is passed, the return value is a tuple (int / QgsLayoutExporter.ExportResult, str)
By consistency, it would be worth to return
QgsLayoutExporter.ExportResultin both cases or a tuple but mixed type is confusingSteps to reproduce the issue
.
Versions
3.42.3 but doc of 3.42.3 and master is the same.
Supported QGIS version
New profile
Additional context
No response