Skip to content

Commit

Permalink
Don't show useless "available in python as" notes in PyQGIS docs
Browse files Browse the repository at this point in the history
Since the method name used in the docs is ALREADY the python version!
  • Loading branch information
nyalldawson committed Feb 28, 2025
1 parent 43fef67 commit 632d196
Show file tree
Hide file tree
Showing 41 changed files with 27 additions and 210 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ Does the given action.
:param defaultValueIndex: index of the field to be used if the action has a $currfield placeholder.
:param scope: expression context scope to add during expression evaluation

.. note::

available in Python bindings as doActionFeature
%End

void doAction( QUuid actionId, const QgsFeature &feature, const QgsExpressionContext &context );
Expand Down
3 changes: 0 additions & 3 deletions python/PyQt6/core/auto_generated/browser/qgszipitem.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ Creates a new data item from the specified path.
%Docstring
Creates a new data item from the specified path.

.. note::

available in Python as itemFromFilePath
%End

static QIcon iconZip();
Expand Down
21 changes: 0 additions & 21 deletions python/PyQt6/core/auto_generated/dxf/qgsdxfexport.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,6 @@ Write a tuple of group code and integer value
:param code: group code
:param i: integer value

.. note::

available in Python bindings as writeGroupInt
%End

void writeGroup( int code, long long i ) /PyName=writeGroupLong/;
Expand All @@ -329,9 +326,6 @@ Write a tuple of group code and long value
:param code: group code
:param i: integer value

.. note::

available in Python bindings as writeGroupLong
%End

void writeGroup( int code, double d ) /PyName=writeGroupDouble/;
Expand All @@ -341,9 +335,6 @@ Write a group code with a floating point value
:param code: group code
:param d: floating point value

.. note::

available in Python bindings as writeGroupDouble
%End

void writeGroup( int code, const QString &s );
Expand All @@ -361,9 +352,6 @@ Write a group code with a point
:param code: group code
:param p: point value

.. note::

available in Python bindings as writeGroupPointV2
%End

void writeGroup( const QColor &color, int exactMatch = 62, int rgbCode = 420, int transparencyCode = 440 );
Expand Down Expand Up @@ -431,9 +419,6 @@ Write line (as a polyline)
%Docstring
Write point

.. note::

available in Python bindings as writePointV2
%End

void writeFilledCircle( const QString &layer, const QColor &color, const QgsPoint &pt, double radius ) /PyName=writeFillCircleV2/;
Expand All @@ -449,18 +434,12 @@ Write filled circle (as hatch)
%Docstring
Write circle (as polyline)

.. note::

available in Python bindings as writeCircleV2
%End

void writeText( const QString &layer, const QString &text, const QgsPoint &pt, double size, double angle, const QColor &color, QgsDxfExport::HAlign hali = QgsDxfExport::HAlign::Undefined, QgsDxfExport::VAlign vali = QgsDxfExport::VAlign::Undefined ) /PyName=writeTextV2/;
%Docstring
Write text (TEXT)

.. note::

available in Python bindings as writeTextV2
%End

void writeMText( const QString &layer, const QString &text, const QgsPoint &pt, double width, double angle, const QColor &color );
Expand Down
3 changes: 0 additions & 3 deletions python/PyQt6/core/auto_generated/geometry/qgsgeometry.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -938,9 +938,6 @@ Adds a new island polygon to a multipolygon feature

:return: OperationResult a result code: success or reason of failure

.. note::

available in python bindings as addPartGeometry
%End

QgsGeometry removeInteriorRings( double minimumAllowedArea = -1 ) const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,6 @@ temporary layer store.
this version of the :py:func:`~QgsProcessingUtils.createFeatureSink` function has an API designed around use from the
SIP bindings. c++ code should call the other :py:func:`~QgsProcessingUtils.createFeatureSink` version.

.. note::

available in Python bindings as :py:func:`~QgsProcessingUtils.createFeatureSink`
%End


Expand Down
6 changes: 0 additions & 6 deletions python/PyQt6/core/auto_generated/project/qgsproject.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,6 @@ a hierarchy of keys and corresponding values

The key string must be valid xml tag names in order to be saved to the file.

.. note::

available in Python bindings as writeEntryBool

.. seealso:: :py:func:`readBoolEntry`
%End
Expand All @@ -554,9 +551,6 @@ a hierarchy of keys and corresponding values

The key string must be valid xml tag names in order to be saved to the file.

.. note::

available in Python bindings as writeEntryDouble

.. seealso:: :py:func:`readDoubleEntry`
%End
Expand Down
3 changes: 0 additions & 3 deletions python/PyQt6/core/auto_generated/qgsdatasourceuri.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ Sets a generic parameter ``value`` on the URI.
%Docstring
Sets a generic parameter list ``value`` on the URI.

.. note::

available in Python as setParamList
%End

int removeParam( const QString &key );
Expand Down
3 changes: 0 additions & 3 deletions python/PyQt6/core/auto_generated/qgsgml.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ Does the HTTP GET request to the WFS server

:return: 0 in case of success

.. note::

available in Python as getFeaturesUri
%End

int getFeatures( const QByteArray &data, Qgis::WkbType *wkbType, QgsRectangle *extent = 0 );
Expand Down
3 changes: 0 additions & 3 deletions python/PyQt6/core/auto_generated/qgsmaplayerstore.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ These layers will also be deleted.

.. seealso:: :py:func:`removeAllMapLayers`

.. note::

available in Python bindings as removeMapLayersById.
%End

void removeMapLayers( const QList<QgsMapLayer *> &layers );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ Returns the raster shader
const QgsRasterShader *shader() const /PyName=constShader/;
%Docstring

.. note::

available in Python as constShader
%End

virtual bool canCreateRasterAttributeTable( ) const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,6 @@ a matching category was found. This can be used to differentiate between
``None`` returned as a result of no matching category vs ``None`` as a result
of disabled categories.

.. note::

available in Python bindings as symbolForValue2
%End

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,10 @@ Returns a list of all ranges used in the classification.
void addClass( const QgsRendererRange &range ) /PyName=addClassRange/;
%Docstring

.. note::

available in Python bindings as addClassRange
%End
void addClass( double lower, double upper ) /PyName=addClassLowerUpper/;
%Docstring

.. note::

available in Python bindings as addClassLowerUpper
%End

void addBreak( double breakValue, bool updateSymbols = true );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,6 @@ class QgsRendererRangeLabelFormat /Deprecated="Since 3.10. Use QgsClassification
QString labelForRange( double lower, double upper ) const /PyName=labelForLowerUpper/;
%Docstring

.. note::

labelForLowerUpper in Python bindings
%End
QString labelForRange( const QgsRendererRange &range ) const;
QString formatNumber( double value ) const;
Expand Down
3 changes: 0 additions & 3 deletions python/PyQt6/core/auto_generated/symbology/qgssvgcache.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,6 @@ default values in the SVG file, only the first one is considered.
:param defaultStrokeOpacity: will be set to default stroke opacity specified in SVG, if present
:param blocking: forces to wait for loading before returning image (optional).

.. note::

Available in Python bindings as containsParamsV3

.. warning::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1091,9 +1091,6 @@ and any displacement required to align with the marker's anchor point.
:param offsetX: will be set to required horizontal offset (in painter units)
:param offsetY: will be set to required vertical offset (in painter units)

.. note::

available in Python as markerOffsetWithWidthAndHeight
%End

void markerOffset( QgsSymbolRenderContext &context, double width, double height,
Expand All @@ -1102,9 +1099,6 @@ and any displacement required to align with the marker's anchor point.
const QgsMapUnitScale &widthMapUnitScale, const QgsMapUnitScale &heightMapUnitScale ) const /PyName=markerOffset2/;
%Docstring

.. note::

available in Python bindings as markerOffset2
%End

static QPointF _rotatedOffset( QPointF offset, double angle );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,6 @@ Checks if ``element`` contains a graphic fill with a raster image of type PNG, J
double &strokeWidth, double &size ) /PyName=wellKnownMarkerFromSld2/;
%Docstring

.. note::

available in Python as wellKnownMarkerFromSld2
%End

static void externalMarkerToSld( QDomDocument &doc, QDomElement &element,
Expand Down
12 changes: 0 additions & 12 deletions python/PyQt6/core/auto_generated/vector/qgsvectorlayer.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -1148,9 +1148,6 @@ Moves the vertex at the given position number,
ring and item (first number is index 0), and feature
to the given coordinates.

.. note::

available in Python as moveVertexV2

.. note::

Expand Down Expand Up @@ -1257,9 +1254,6 @@ Adds a ring to polygon/multipolygon features (takes ownership)
- AddRingNotValid
- AddRingCrossesExistingRings

.. note::

available in Python as addCurvedRing

.. note::

Expand Down Expand Up @@ -1343,9 +1337,6 @@ Adds a new part polygon to a multipart feature
- InvalidBaseGeometry
- InvalidInputGeometryType

.. note::

available in Python bindings as addPartV2

.. note::

Expand All @@ -1358,9 +1349,6 @@ Adds a new part polygon to a multipart feature
Qgis::GeometryOperationResult addPart( QgsCurve *ring /Transfer/ ) /PyName=addCurvedPart/;
%Docstring

.. note::

available in Python as addCurvedPart

.. note::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ Moves the vertex at the given position number,
ring and item (first number is index 0), and feature
to the given coordinates

.. note::

available in Python bindings as moveVertexV2
%End

Qgis::VectorEditResult deleteVertex( QgsFeatureId featureId, int vertex );
Expand Down Expand Up @@ -114,9 +111,6 @@ Adds a ring to polygon/multipolygon features

:return: OperationResult result code: success or reason of failure

.. note::

available in python bindings as addCurvedRing
%End

Qgis::GeometryOperationResult addPart( const QVector<QgsPointXY> &ring, QgsFeatureId featureId ) /Deprecated="Since 3.12. Will be removed in QGIS 4.0. Use the variant which accepts QgsPoint objects instead of QgsPointXY."/;
Expand Down Expand Up @@ -162,9 +156,6 @@ Adds a new part polygon to a multipart feature
- :py:class:`QgsGeometry`.InvalidBaseGeometry
- :py:class:`QgsGeometry`.InvalidInput

.. note::

available in python bindings as addCurvedPart
%End

int translateFeature( QgsFeatureId featureId, double dx, double dy );
Expand Down
6 changes: 0 additions & 6 deletions python/PyQt6/gui/auto_generated/maptools/qgsmaptool.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,6 @@ Constructor takes a map canvas as a parameter.
%Docstring
Transforms a ``point`` from map coordinates to ``layer`` coordinates.

.. note::

This method is available in the Python bindings as toLayerCoordinatesV2.
%End

QgsPointXY toLayerCoordinates( const QgsMapLayer *layer, QPoint point );
Expand All @@ -338,9 +335,6 @@ Transforms a ``point`` from ``layer`` coordinates to map coordinates (which is d
%Docstring
Transforms a ``point`` from ``layer`` coordinates to map coordinates (which is different in case reprojection is used).

.. note::

This method is available in the Python bindings as toMapCoordinatesV2.
%End

QgsRectangle toLayerCoordinates( const QgsMapLayer *layer, const QgsRectangle &rect );
Expand Down
3 changes: 0 additions & 3 deletions python/PyQt6/gui/auto_generated/qgsunitselectionwidget.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,6 @@ Sets the selected unit index

:param unitIndex: index of unit to set as current

.. note::

available in Python bindings as setUnitIndex
%End

void setUnit( Qgis::RenderUnit unit );
Expand Down
3 changes: 0 additions & 3 deletions python/core/auto_generated/actions/qgsactionmanager.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ Does the given action.
:param defaultValueIndex: index of the field to be used if the action has a $currfield placeholder.
:param scope: expression context scope to add during expression evaluation

.. note::

available in Python bindings as doActionFeature
%End

void doAction( QUuid actionId, const QgsFeature &feature, const QgsExpressionContext &context );
Expand Down
3 changes: 0 additions & 3 deletions python/core/auto_generated/browser/qgszipitem.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ Creates a new data item from the specified path.
%Docstring
Creates a new data item from the specified path.

.. note::

available in Python as itemFromFilePath
%End

static QIcon iconZip();
Expand Down
Loading

0 comments on commit 632d196

Please sign in to comment.