mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-18 00:06:00 -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.
9 lines
1.1 KiB
Python
9 lines
1.1 KiB
Python
# The following has been generated automatically from src/core/layertree/qgslayertreenode.h
|
|
QgsLayerTreeNode.NodeGroup = QgsLayerTreeNode.NodeType.NodeGroup
|
|
QgsLayerTreeNode.NodeLayer = QgsLayerTreeNode.NodeType.NodeLayer
|
|
try:
|
|
QgsLayerTreeNode.__attribute_docs__ = {'willAddChildren': 'Emitted when one or more nodes will be added to a node within the tree\n', 'addedChildren': 'Emitted when one or more nodes have been added to a node within the tree\n', 'willRemoveChildren': 'Emitted when one or more nodes will be removed from a node within the tree\n', 'removedChildren': 'Emitted when one or more nodes has been removed from a node within the tree\n', 'visibilityChanged': 'Emitted when check state of a node within the tree has been changed\n', 'customPropertyChanged': 'Emitted when a custom property of a node within the tree has been changed or removed\n', 'expandedChanged': 'Emitted when the collapsed/expanded state of a node within the tree has been changed\n', 'nameChanged': 'Emitted when the name of the node is changed\n'}
|
|
except NameError:
|
|
pass
|
|
QgsLayerTreeNode.readXml = staticmethod(QgsLayerTreeNode.readXml)
|