mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-09 00:08:52 -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/core/network/qgsnewsfeedparser.h
|
|
try:
|
|
QgsNewsFeedParser.Entry.__attribute_docs__ = {'key': 'Unique entry identifier', 'title': 'Entry title', 'imageUrl': 'Optional URL for image associated with entry', 'image': 'Optional image data', 'content': 'HTML content of news entry', 'link': 'Optional URL link for entry', 'sticky': '``True`` if entry is "sticky" and should always be shown at the top', 'expiry': 'Optional auto-expiry time for entry'}
|
|
except NameError:
|
|
pass
|
|
try:
|
|
QgsNewsFeedParser.__attribute_docs__ = {'fetched': 'Emitted when ``entries`` have been fetched from the feed.\n\n.. seealso:: :py:func:`fetch`\n', 'entryAdded': 'Emitted whenever a new ``entry`` is available from the feed (as a result\nof a call to :py:func:`~QgsNewsFeedParser.fetch`).\n\n.. seealso:: :py:func:`fetch`\n', 'entryUpdated': 'Emitted whenever an existing ``entry`` is available from the feed (as a result\nof a call to :py:func:`~QgsNewsFeedParser.fetch`).\n\n.. seealso:: :py:func:`fetch`\n\n.. versionadded:: 3.36\n', 'entryDismissed': 'Emitted whenever an ``entry`` is dismissed (as a result of a call\nto :py:func:`~QgsNewsFeedParser.dismissEntry`).\n\n.. seealso:: :py:func:`dismissEntry`\n', 'imageFetched': 'Emitted when the image attached to the entry with the specified ``key`` has been fetched\nand is now available.\n'}
|
|
except NameError:
|
|
pass
|
|
QgsNewsFeedParser.keyForFeed = staticmethod(QgsNewsFeedParser.keyForFeed)
|