Skip to content

Commit

Permalink
Fix formatting of Python ..deprecated annotations in docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 2, 2024
1 parent 081c258 commit ef0289f
Show file tree
Hide file tree
Showing 401 changed files with 3,389 additions and 2,314 deletions.
4 changes: 2 additions & 2 deletions python/3d/auto_generated/qgs3dmapscene.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ Returns a map of 3D map scenes (by name) open in the QGIS application.

Only available from the QGIS desktop application.

.. deprecated::
QGIS 3.36. Use QgisAppInterface.mapCanvases3D() instead.
.. deprecated:: 3.36

Use QgisAppInterface.mapCanvases3D() instead.
.. versionadded:: 3.30
%End

Expand Down
10 changes: 6 additions & 4 deletions python/3d/auto_generated/symbols/qgsline3dsymbol.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,18 @@ Sets width of the line symbol (in map units)
%Docstring
Returns height (altitude) of the symbol (in map units)

.. deprecated::
QGIS 3.36. Use :py:func:`~QgsLine3DSymbol.offset` instead.
.. deprecated:: 3.36

Use :py:func:`~QgsLine3DSymbol.offset` instead.
%End

void setHeight( float height ) /Deprecated/;
%Docstring
Sets height (altitude) of the symbol (in map units)

.. deprecated::
QGIS 3.36. Use :py:func:`~QgsLine3DSymbol.setOffset` instead.
.. deprecated:: 3.36

Use :py:func:`~QgsLine3DSymbol.setOffset` instead.
%End

float offset() const;
Expand Down
10 changes: 6 additions & 4 deletions python/3d/auto_generated/symbols/qgspolygon3dsymbol.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,18 @@ Sets method that determines how altitude is bound to individual vertices
%Docstring
Returns height (altitude) of the symbol (in map units)

.. deprecated::
QGIS 3.36. Use :py:func:`~QgsPolygon3DSymbol.offset` instead.
.. deprecated:: 3.36

Use :py:func:`~QgsPolygon3DSymbol.offset` instead.
%End

void setHeight( float height ) /Deprecated/;
%Docstring
Sets height (altitude) of the symbol (in map units)

.. deprecated::
QGIS 3.36. Use :py:func:`~QgsPolygon3DSymbol.setOffset` instead.
.. deprecated:: 3.36

Use :py:func:`~QgsPolygon3DSymbol.setOffset` instead.
%End

float offset() const;
Expand Down
4 changes: 2 additions & 2 deletions python/PyQt6/3d/auto_generated/qgs3dmapscene.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ Returns a map of 3D map scenes (by name) open in the QGIS application.

Only available from the QGIS desktop application.

.. deprecated::
QGIS 3.36. Use QgisAppInterface.mapCanvases3D() instead.
.. deprecated:: 3.36

Use QgisAppInterface.mapCanvases3D() instead.
.. versionadded:: 3.30
%End

Expand Down
10 changes: 6 additions & 4 deletions python/PyQt6/3d/auto_generated/symbols/qgsline3dsymbol.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,18 @@ Sets width of the line symbol (in map units)
%Docstring
Returns height (altitude) of the symbol (in map units)

.. deprecated::
QGIS 3.36. Use :py:func:`~QgsLine3DSymbol.offset` instead.
.. deprecated:: 3.36

Use :py:func:`~QgsLine3DSymbol.offset` instead.
%End

void setHeight( float height ) /Deprecated/;
%Docstring
Sets height (altitude) of the symbol (in map units)

.. deprecated::
QGIS 3.36. Use :py:func:`~QgsLine3DSymbol.setOffset` instead.
.. deprecated:: 3.36

Use :py:func:`~QgsLine3DSymbol.setOffset` instead.
%End

float offset() const;
Expand Down
10 changes: 6 additions & 4 deletions python/PyQt6/3d/auto_generated/symbols/qgspolygon3dsymbol.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,18 @@ Sets method that determines how altitude is bound to individual vertices
%Docstring
Returns height (altitude) of the symbol (in map units)

.. deprecated::
QGIS 3.36. Use :py:func:`~QgsPolygon3DSymbol.offset` instead.
.. deprecated:: 3.36

Use :py:func:`~QgsPolygon3DSymbol.offset` instead.
%End

void setHeight( float height ) /Deprecated/;
%Docstring
Sets height (altitude) of the symbol (in map units)

.. deprecated::
QGIS 3.36. Use :py:func:`~QgsPolygon3DSymbol.setOffset` instead.
.. deprecated:: 3.36

Use :py:func:`~QgsPolygon3DSymbol.setOffset` instead.
%End

float offset() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ QgsRasterCalculator constructor.
:param nOutputRows: number of rows in output raster
:param rasterEntries: list of referenced raster layers

.. deprecated::
QGIS 3.8. Use the version with transformContext instead.
.. deprecated:: 3.8

Use the version with transformContext instead.
%End

QgsRasterCalculator( const QString &formulaString, const QString &outputFile, const QString &outputFormat,
Expand All @@ -137,8 +138,9 @@ QgsRasterCalculator constructor.
:param nOutputRows: number of rows in output raster
:param rasterEntries: list of referenced raster layers

.. deprecated::
QGIS 3.8. Use the version with transformContext instead.
.. deprecated:: 3.8

Use the version with transformContext instead.
%End

Result processCalculation( QgsFeedback *feedback = 0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ Returns a list of available resolution methods.
Returns a list of descriptions for available resolutions for errors.
The index will be passed as ``method`` to :py:func:`fixError`.

.. deprecated::
QGIS 3.12. Use :py:func:`~QgsGeometryCheck.availableResolutionMethods` instead.
.. deprecated:: 3.12

Use :py:func:`~QgsGeometryCheck.availableResolutionMethods` instead.
.. versionadded:: 3.4
%End

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
QgsBlockingNetworkRequest.RequestFlags.baseClass = QgsBlockingNetworkRequest
RequestFlags = QgsBlockingNetworkRequest # dirty hack since SIP seems to introduce the flags in module
try:
QgsBlockingNetworkRequest.__attribute_docs__ = {'downloadProgress': 'Emitted when when data arrives during a request.\n', 'downloadFinished': 'Emitted once a request has finished downloading.\n\n.. deprecated::\n Use the :py:func:`~QgsBlockingNetworkRequest.finished` signal instead.\n', 'uploadProgress': 'Emitted when when data are sent during a request.\n\n.. versionadded:: 3.22\n', 'finished': 'Emitted once a request has finished.\n'}
QgsBlockingNetworkRequest.__attribute_docs__ = {'downloadProgress': 'Emitted when when data arrives during a request.\n', 'downloadFinished': 'Emitted once a request has finished downloading.\n\n.. deprecated:: 3.40\n\n Use the :py:func:`~QgsBlockingNetworkRequest.finished` signal instead.\n', 'uploadProgress': 'Emitted when when data are sent during a request.\n\n.. versionadded:: 3.22\n', 'finished': 'Emitted once a request has finished.\n'}
except NameError:
pass
try:
Expand Down
2 changes: 1 addition & 1 deletion python/PyQt6/core/auto_additions/qgscadutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
except NameError:
pass
try:
QgsCadUtils.AlignMapPointOutput.__attribute_docs__ = {'valid': 'Whether the combination of constraints is actually valid', 'finalMapPoint': 'map point aligned according to the constraints', 'snapMatch': 'Snapped point - only valid if actually used for something\n\n.. versionadded:: 3.14', 'edgeMatch': 'Snapped segment - only valid if actually used for something\n\n.. deprecated::\n will be removed in QGIS 4.0 - use snapMatch instead', 'softLockCommonAngle': 'Angle (in degrees) to which we have soft-locked ourselves (if not set it is -1)'}
QgsCadUtils.AlignMapPointOutput.__attribute_docs__ = {'valid': 'Whether the combination of constraints is actually valid', 'finalMapPoint': 'map point aligned according to the constraints', 'snapMatch': 'Snapped point - only valid if actually used for something\n\n.. versionadded:: 3.14', 'edgeMatch': 'Snapped segment - only valid if actually used for something\n\n.. deprecated:: 3.40\n\n Will be removed in QGIS 4.0 - use snapMatch instead.', 'softLockCommonAngle': 'Angle (in degrees) to which we have soft-locked ourselves (if not set it is -1)'}
except NameError:
pass
try:
Expand Down
10 changes: 6 additions & 4 deletions python/PyQt6/core/auto_additions/qgsdatumtransform.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
QgsDatumTransform.datumTransformInfo = staticmethod(QgsDatumTransform.datumTransformInfo)
QgsDatumTransform.TransformPair.__doc__ = """Contains datum transform information.
.. deprecated::
Not used for builds based on Proj >= 6.0"""
.. deprecated:: 3.40
Not used for builds based on Proj >= 6.0."""
QgsDatumTransform.TransformInfo.__doc__ = """Contains datum transform information.
.. deprecated::
Not used on builds based on Proj >= 6.0"""
.. deprecated:: 3.40
Not used on builds based on Proj >= 6.0."""
QgsDatumTransform.GridDetails.__doc__ = """Contains information about a projection transformation grid file.
.. versionadded:: 3.8"""
Expand Down
4 changes: 2 additions & 2 deletions python/PyQt6/core/auto_additions/qgsfeaturepickermodelbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
QgsFeaturePickerModelBase.IdentifierValueRole = QgsFeaturePickerModelBase.CustomRole.IdentifierValue
QgsFeaturePickerModelBase.Role.IdentifierValueRole = QgsFeaturePickerModelBase.CustomRole.IdentifierValue
QgsFeaturePickerModelBase.IdentifierValueRole.is_monkey_patched = True
QgsFeaturePickerModelBase.IdentifierValueRole.__doc__ = "Used to retrieve the identifier value (primary key) of a feature. \n.. deprecated:: Use IdentifierValuesRole instead"
QgsFeaturePickerModelBase.IdentifierValueRole.__doc__ = "Used to retrieve the identifier value (primary key) of a feature. \n.. deprecated:: 3.40. Use IdentifierValuesRole instead."
QgsFeaturePickerModelBase.IdentifierValuesRole = QgsFeaturePickerModelBase.CustomRole.IdentifierValues
QgsFeaturePickerModelBase.Role.IdentifierValuesRole = QgsFeaturePickerModelBase.CustomRole.IdentifierValues
QgsFeaturePickerModelBase.IdentifierValuesRole.is_monkey_patched = True
Expand All @@ -31,7 +31,7 @@
* ``IdentifierValueRole``: Used to retrieve the identifier value (primary key) of a feature.
.. deprecated:: Use IdentifierValuesRole instead
.. deprecated:: 3.40. Use IdentifierValuesRole instead.
* ``IdentifierValuesRole``: Used to retrieve the identifierValues (primary keys) of a feature.
* ``ValueRole``: Used to retrieve the displayExpression of a feature.
Expand Down
2 changes: 1 addition & 1 deletion python/PyQt6/core/auto_additions/qgsgpsdetector.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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'}
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:: 3.40\n\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)
Expand Down
2 changes: 1 addition & 1 deletion python/PyQt6/core/auto_additions/qgsgpsinformation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The following has been generated automatically from src/core/gps/qgsgpsinformation.h
try:
QgsGpsInformation.__attribute_docs__ = {'latitude': 'Latitude in decimal degrees, using the WGS84 datum. A positive value indicates the Northern Hemisphere, and\na negative value indicates the Southern Hemisphere.', 'longitude': 'Longitude in decimal degrees, using the WGS84 datum. A positive value indicates the Eastern Hemisphere, and\na negative value indicates the Western Hemisphere.', 'elevation': 'Altitude (in meters) above or below the mean sea level.', 'elevation_diff': 'Geoidal separation (in meters).\n\nThe difference between the WGS-84 Earth ellipsoid and the mean sea level (geoid).\n\nNegative values indicate that mean sea level is below the ellipsoid.\n\nThis value can be added to the elevation value to obtain the geoidal elevation.\n\n.. versionadded:: 3.18', 'speed': 'Ground speed, in km/h.', 'direction': 'The bearing measured in degrees clockwise from true north to the direction of travel.', 'satellitesInView': 'Contains a list of information relating to the current satellites in view.', 'pdop': 'Dilution of precision.', 'hdop': 'Horizontal dilution of precision.', 'vdop': 'Vertical dilution of precision.', 'hvacc': '3D RMS\n\n.. versionadded:: 3.18', 'utcTime': 'The time at which this position was reported, in UTC time.\n\n.. versionadded:: 3.30', 'utcDateTime': 'The date and time at which this position was reported, in UTC time.', 'fixMode': 'Fix mode (where M = Manual, forced to operate in 2D or 3D or A = Automatic, 3D/2D)', 'fixType': 'Contains the fix type, where 1 = no fix, 2 = 2d fix, 3 = 3d fix\n\n.. deprecated::\n , use :py:func:`~QgsGpsInformation.constellationFixStatus` or :py:func:`~QgsGpsInformation.bestFixStatus` instead.', 'quality': 'GPS quality indicator (0 = Invalid; 1 = Fix; 2 = Differential, 3 = Sensitive, etc.)\n\n.. deprecated::\n use qualityIndicator instead', 'qualityIndicator': 'Returns the signal quality indicator\n\n.. versionadded:: 3.22.6', 'satellitesUsed': 'Count of satellites used in obtaining the fix.', 'status': 'Status (A = active or V = void)', 'satPrn': 'IDs of satellites used in the position fix.', 'satInfoComplete': '``True`` if satellite information is complete.'}
QgsGpsInformation.__attribute_docs__ = {'latitude': 'Latitude in decimal degrees, using the WGS84 datum. A positive value indicates the Northern Hemisphere, and\na negative value indicates the Southern Hemisphere.', 'longitude': 'Longitude in decimal degrees, using the WGS84 datum. A positive value indicates the Eastern Hemisphere, and\na negative value indicates the Western Hemisphere.', 'elevation': 'Altitude (in meters) above or below the mean sea level.', 'elevation_diff': 'Geoidal separation (in meters).\n\nThe difference between the WGS-84 Earth ellipsoid and the mean sea level (geoid).\n\nNegative values indicate that mean sea level is below the ellipsoid.\n\nThis value can be added to the elevation value to obtain the geoidal elevation.\n\n.. versionadded:: 3.18', 'speed': 'Ground speed, in km/h.', 'direction': 'The bearing measured in degrees clockwise from true north to the direction of travel.', 'satellitesInView': 'Contains a list of information relating to the current satellites in view.', 'pdop': 'Dilution of precision.', 'hdop': 'Horizontal dilution of precision.', 'vdop': 'Vertical dilution of precision.', 'hvacc': '3D RMS\n\n.. versionadded:: 3.18', 'utcTime': 'The time at which this position was reported, in UTC time.\n\n.. versionadded:: 3.30', 'utcDateTime': 'The date and time at which this position was reported, in UTC time.', 'fixMode': 'Fix mode (where M = Manual, forced to operate in 2D or 3D or A = Automatic, 3D/2D)', 'fixType': 'Contains the fix type, where 1 = no fix, 2 = 2d fix, 3 = 3d fix\n\n.. deprecated:: 3.40\n\n use :py:func:`~QgsGpsInformation.constellationFixStatus` or :py:func:`~QgsGpsInformation.bestFixStatus` instead.', 'quality': 'GPS quality indicator (0 = Invalid; 1 = Fix; 2 = Differential, 3 = Sensitive, etc.)\n\n.. deprecated:: 3.40\n\n Use qualityIndicator instead.', 'qualityIndicator': 'Returns the signal quality indicator\n\n.. versionadded:: 3.22.6', 'satellitesUsed': 'Count of satellites used in obtaining the fix.', 'status': 'Status (A = active or V = void)', 'satPrn': 'IDs of satellites used in the position fix.', 'satInfoComplete': '``True`` if satellite information is complete.'}
except NameError:
pass
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
QgsLayerTreeModelLegendNode.EmbeddedWidget = QgsLayerTreeModelLegendNode.NodeTypes.EmbeddedWidget
QgsLayerTreeModelLegendNode.ColorRampLegend = QgsLayerTreeModelLegendNode.NodeTypes.ColorRampLegend
try:
QgsLayerTreeModelLegendNode.__attribute_docs__ = {'context': 'Render context, if available', 'painter': 'Painter', 'point': 'Top-left corner of the legend item.\n\n.. deprecated::\n Use top, columnLeft, columnRight instead.', 'labelXOffset': 'Offset from the left side where label should start.\n\n.. deprecated::\n use columnLeft, columnRight instead.', 'top': 'Top y-position of legend item.\n\n.. versionadded:: 3.10', 'columnLeft': 'Left side of current legend column. This should be used when determining\nwhere to render legend item content, correctly respecting the symbol and text\nalignment from the legend settings.\n\n.. versionadded:: 3.10', 'columnRight': 'Right side of current legend column. This should be used when determining\nwhere to render legend item content, correctly respecting the symbol and text\nalignment from the legend settings.\n\n.. versionadded:: 3.10', 'maxSiblingSymbolWidth': 'Largest symbol width, considering all other sibling legend components associated with\nthe current component.\n\n.. versionadded:: 3.10', 'patchShape': 'The patch shape to render for the node.\n\n.. versionadded:: 3.14', 'patchSize': 'Symbol patch size to render for the node.\n\nIf either the width or height are zero, then the default width/height from :py:func:`QgsLegendSettings.symbolSize()` should be used instead.\n\n.. versionadded:: 3.14', 'textDocument': 'Optional text document\n\n.. versionadded:: 3.30', 'textDocumentMetrics': 'Optional text document metrics.\n\n.. versionadded:: 3.30', 'screenProperties': 'Destination screen properties.\n\n.. versionadded:: 3.32', 'dataChanged': 'Emitted on internal data change so the layer tree model can forward the signal to views\n', 'sizeChanged': 'Emitted when the size of this node changes.\n\n.. versionadded:: 3.16\n'}
QgsLayerTreeModelLegendNode.__attribute_docs__ = {'context': 'Render context, if available', 'painter': 'Painter', 'point': 'Top-left corner of the legend item.\n\n.. deprecated:: 3.40\n\n Use top, columnLeft, columnRight instead.', 'labelXOffset': 'Offset from the left side where label should start.\n\n.. deprecated:: 3.40\n\n Use columnLeft, columnRight instead.', 'top': 'Top y-position of legend item.\n\n.. versionadded:: 3.10', 'columnLeft': 'Left side of current legend column. This should be used when determining\nwhere to render legend item content, correctly respecting the symbol and text\nalignment from the legend settings.\n\n.. versionadded:: 3.10', 'columnRight': 'Right side of current legend column. This should be used when determining\nwhere to render legend item content, correctly respecting the symbol and text\nalignment from the legend settings.\n\n.. versionadded:: 3.10', 'maxSiblingSymbolWidth': 'Largest symbol width, considering all other sibling legend components associated with\nthe current component.\n\n.. versionadded:: 3.10', 'patchShape': 'The patch shape to render for the node.\n\n.. versionadded:: 3.14', 'patchSize': 'Symbol patch size to render for the node.\n\nIf either the width or height are zero, then the default width/height from :py:func:`QgsLegendSettings.symbolSize()` should be used instead.\n\n.. versionadded:: 3.14', 'textDocument': 'Optional text document\n\n.. versionadded:: 3.30', 'textDocumentMetrics': 'Optional text document metrics.\n\n.. versionadded:: 3.30', 'screenProperties': 'Destination screen properties.\n\n.. versionadded:: 3.32', 'dataChanged': 'Emitted on internal data change so the layer tree model can forward the signal to views\n', 'sizeChanged': 'Emitted when the size of this node changes.\n\n.. versionadded:: 3.16\n'}
except NameError:
pass
try:
Expand Down
Loading

0 comments on commit ef0289f

Please sign in to comment.