QGIS/python/PyQt6/gui/auto_additions/qgsprocessingalgorithmdialogbase.py
Nyall Dawson 1f27fc627a [pyqgis] Wrap unambiguously static methods in staticmethod
sip doesn't use the standard Python staticmethod type for defining
static methods, which means that standard means of testing
for a static method (like `isinstance(..., staticmethod)`) fail
with any PyQGIS static methods.

This causes issues with lint tools, which incorrectly flag
calls to QGIS static methods as missing self arguments. It also
breaks detection of static methods in the sphinx PyQGIS docs,
so all static methods are shown as non-static.

Work around this in sipify, by wrapping unambiguously static
methods in staticmethod wrappers.
2024-08-14 22:08:41 +10:00

14 lines
1.3 KiB
Python

# The following has been generated automatically from src/gui/processing/qgsprocessingalgorithmdialogbase.h
QgsProcessingAlgorithmDialogBase.FormatPlainText = QgsProcessingAlgorithmDialogBase.LogFormat.FormatPlainText
QgsProcessingAlgorithmDialogBase.FormatHtml = QgsProcessingAlgorithmDialogBase.LogFormat.FormatHtml
# monkey patching scoped based enum
QgsProcessingAlgorithmDialogBase.DialogMode.Single.__doc__ = "Single algorithm execution mode"
QgsProcessingAlgorithmDialogBase.DialogMode.Batch.__doc__ = "Batch processing mode"
QgsProcessingAlgorithmDialogBase.DialogMode.__doc__ = "Dialog modes.\n\n.. versionadded:: 3.24\n\n" + '* ``Single``: ' + QgsProcessingAlgorithmDialogBase.DialogMode.Single.__doc__ + '\n' + '* ``Batch``: ' + QgsProcessingAlgorithmDialogBase.DialogMode.Batch.__doc__
# --
try:
QgsProcessingAlgorithmDialogBase.__attribute_docs__ = {'algorithmAboutToRun': 'Emitted when the algorithm is about to run in the specified ``context``.\n\nThis signal can be used to tweak the ``context`` prior to the algorithm execution.\n\n.. versionadded:: 3.38\n', 'algorithmFinished': 'Emitted whenever an algorithm has finished executing in the dialog.\n\n.. versionadded:: 3.14\n'}
except NameError:
pass
QgsProcessingAlgorithmDialogBase.formatStringForLog = staticmethod(QgsProcessingAlgorithmDialogBase.formatStringForLog)