QGIS/python/core/auto_additions/qgstemporalutils.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

12 lines
1.8 KiB
Python

# The following has been generated automatically from src/core/qgstemporalutils.h
try:
QgsTemporalUtils.__attribute_docs__ = {'animationRange': 'Dictates the overall temporal range of the animation.', 'frameDuration': 'Duration of individual export frames', 'outputDirectory': 'Destination directory for created image files.', 'fileNameTemplate': "The filename template for exporting the frames.\n\nThis must be in format prefix####.format, where number of\n``# ``characters represents how many 0's should be left-padded to the frame number\ne.g. my###.jpg will create frames my001.jpg, my002.jpg, etc", 'decorations': 'List of decorations to draw onto exported frames.', 'availableTemporalRanges': 'Contains the list of all available temporal ranges which have data available.\n\nThe list can be a list of non-contiguous ranges (i.e. containing gaps)\nwhich together describe the complete range of times which contain data.\n\nThis list is required whenever the :py:class:`QgsUnitTypes`.TemporalIrregularStep interval is used\nfor an animation.\n\n.. versionadded:: 3.30', 'frameRate': 'Target animation frame rate in frames per second.\n\n.. versionadded:: 3.26'}
except NameError:
pass
QgsTemporalUtils.calculateTemporalRangeForProject = staticmethod(QgsTemporalUtils.calculateTemporalRangeForProject)
QgsTemporalUtils.usedTemporalRangesForProject = staticmethod(QgsTemporalUtils.usedTemporalRangesForProject)
QgsTemporalUtils.exportAnimation = staticmethod(QgsTemporalUtils.exportAnimation)
QgsTemporalUtils.calculateFrameTime = staticmethod(QgsTemporalUtils.calculateFrameTime)
QgsTemporalUtils.calculateDateTimesUsingDuration = staticmethod(QgsTemporalUtils.calculateDateTimesUsingDuration)
QgsTemporalUtils.calculateDateTimesFromISO8601 = staticmethod(QgsTemporalUtils.calculateDateTimesFromISO8601)