mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-11 00:04:09 -04:00
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.
11 lines
1.5 KiB
Python
11 lines
1.5 KiB
Python
# The following has been generated automatically from src/gui/editorwidgets/core/qgseditorwidgetwrapper.h
|
|
QgsEditorWidgetWrapper.ConstraintResultPass = QgsEditorWidgetWrapper.ConstraintResult.ConstraintResultPass
|
|
QgsEditorWidgetWrapper.ConstraintResultFailHard = QgsEditorWidgetWrapper.ConstraintResult.ConstraintResultFailHard
|
|
QgsEditorWidgetWrapper.ConstraintResultFailSoft = QgsEditorWidgetWrapper.ConstraintResult.ConstraintResultFailSoft
|
|
try:
|
|
QgsEditorWidgetWrapper.__attribute_docs__ = {'valueChanged': 'Emit this signal, whenever the value changed.\n\n:param value: The new value\n\n.. deprecated:: QGIS 3.10\n use valuesChanged signal instead\n', 'valuesChanged': 'Emit this signal, whenever the value changed.\nIt will also return the values for the additional fields handled by the widget\n\n:param value: The new value\n:param additionalFieldValues: A map of additional field names with their corresponding values\n\n.. versionadded:: 3.10\n', 'constraintStatusChanged': 'Emit this signal when the constraint status changed.\nconstraintStatusChanged\n\n:param constraint: represented as a string\n:param desc: is the constraint description\n:param err: the error represented as a string. Empty if none.\n:param status:\n', 'constraintResultVisibleChanged': 'Emit this signal when the constraint result visibility changed.\n'}
|
|
except NameError:
|
|
pass
|
|
QgsEditorWidgetWrapper.fromWidget = staticmethod(QgsEditorWidgetWrapper.fromWidget)
|
|
QgsEditorWidgetWrapper.isInTable = staticmethod(QgsEditorWidgetWrapper.isInTable)
|