mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -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.
7 lines
969 B
Python
7 lines
969 B
Python
# The following has been generated automatically from src/core/gps/qgsgpsdetector.h
|
|
try:
|
|
QgsGpsDetector.__attribute_docs__ = {'connectionDetected': 'Emitted when a GPS connection is successfully detected.\n\nCall :py:func:`~QgsGpsDetector.takeConnection` to take ownership of the detected connection.\n\n.. versionadded:: 3.38\n', 'detected': 'Emitted when the GPS connection has been detected. A single connection must listen for this signal and\nimmediately take ownership of the ``connection`` object.\n\n.. deprecated::\n This signal is dangerous and extremely unsafe! It is recommended to instead set the ``useUnsafeSignals`` parameter to ``False`` in the QgsGpsDetector constructor and use the safe :py:func:`~QgsGpsDetector.connectionDetected` signal instead.\n', 'detectionFailed': 'Emitted when the detector could not find a valid GPS connection.\n'}
|
|
except NameError:
|
|
pass
|
|
QgsGpsDetector.availablePorts = staticmethod(QgsGpsDetector.availablePorts)
|