Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove rtype from docstring #5883

Merged
merged 6 commits into from
Dec 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions python/analysis/interpolation/qgsgridfilewriter.sip
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ Writes the grid file.
An optional ``feedback`` object can be set for progress reports and cancelation support

:return: 0 in case of success
:rtype: int

%End

};
Expand Down
2 changes: 0 additions & 2 deletions python/analysis/interpolation/qgsidwinterpolator.sip
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ The default is a coefficient of 2.

Point values are weighted by 1 / ( distance ^ coefficient ).

:rtype: float

.. seealso:: :py:func:`setDistanceCoefficient()`

.. versionadded:: 3.0
Expand Down
5 changes: 1 addition & 4 deletions python/analysis/interpolation/qgsinterpolator.sip
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,13 @@ Source type
virtual int interpolatePoint( double x, double y, double &result, QgsFeedback *feedback = 0 ) = 0;
%Docstring
Calculates interpolation value for map coordinates x, y

:param x: x-coordinate (in map units)
:param y: y-coordinate (in map units)
:param result: out: interpolation result
:param feedback: optional feedback object for progress and cancelation support

:return: 0 in case of success*
:rtype: int

%End


Expand All @@ -122,8 +121,6 @@ An optional ``feedback`` argument may be specified to allow cancelation and
progress reports from the cache operation.

:return: Success in case of success
:rtype: Result

%End


Expand Down
2 changes: 0 additions & 2 deletions python/analysis/interpolation/qgstininterpolator.sip
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ Returns the fields output by features when saving the triangulation.
These fields should be used when creating
a suitable feature sink for setTriangulationSink()

:rtype: QgsFields

.. seealso:: :py:func:`setTriangulationSink()`

.. versionadded:: 3.0
Expand Down
29 changes: 1 addition & 28 deletions python/analysis/network/qgsgraph.sip
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,26 @@ Constructor for QgsGraphEdge.
QVariant cost( int strategyIndex ) const;
%Docstring
Returns edge cost calculated using specified strategy
:param strategyIndex: strategy index

:rtype: QVariant
:param strategyIndex: strategy index
%End

QVector< QVariant > strategies() const;
%Docstring
Returns array of available strategies

:rtype: list of QVariant
%End

int toVertex() const;
%Docstring
Returns the index of the vertex at the end of this edge.

:rtype: int

.. seealso:: :py:func:`fromVertex()`
%End

int fromVertex() const;
%Docstring
Returns the index of the vertex at the start of this edge.

:rtype: int

.. seealso:: :py:func:`toVertex()`
%End

Expand Down Expand Up @@ -95,25 +88,19 @@ This constructor initializes QgsGraphVertex object and associates a vertex with
%Docstring
Returns the incoming edge ids, i.e. edges which end at this node.

:rtype: QgsGraphEdgeIds

.. seealso:: :py:func:`outgoingEdges()`
%End

QgsGraphEdgeIds outgoingEdges() const;
%Docstring
Returns outgoing edge ids, i.e. edges which start at this node.

:rtype: QgsGraphEdgeIds

.. seealso:: :py:func:`incomingEdges()`
%End

QgsPointXY point() const;
%Docstring
Returns point associated with graph vertex.

:rtype: QgsPointXY
%End

};
Expand Down Expand Up @@ -141,53 +128,39 @@ Constructor for QgsGraph.
int addVertex( const QgsPointXY &pt );
%Docstring
Add a vertex to the graph

:rtype: int
%End

int addEdge( int fromVertexIdx, int toVertexIdx, const QVector< QVariant > &strategies );
%Docstring
Add an edge to the graph, going from the ``fromVertexIdx``
to ``toVertexIdx``.

:rtype: int
%End

int vertexCount() const;
%Docstring
Returns number of graph vertices

:rtype: int
%End

const QgsGraphVertex &vertex( int idx ) const;
%Docstring
Returns vertex at given index

:rtype: QgsGraphVertex
%End

int edgeCount() const;
%Docstring
Returns number of graph edges

:rtype: int
%End

const QgsGraphEdge &edge( int idx ) const;
%Docstring
Returns edge at given index

:rtype: QgsGraphEdge
%End

int findVertex( const QgsPointXY &pt ) const;
%Docstring
Find vertex by associated point

:return: vertex index
:rtype: int

%End

};
Expand Down
4 changes: 2 additions & 2 deletions python/analysis/network/qgsgraphanalyzer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ points using different strategies with Dijkstra algorithm
static SIP_PYLIST dijkstra( const QgsGraph *source, int startVertexIdx, int criterionNum, QVector<int> *resultTree = 0, QVector<double> *resultCost = 0 );
%Docstring
Solve shortest path problem using Dijkstra algorithm

:param source: source graph
:param startVertexIdx: index of the start vertex
:param criterionNum: index of the optimization strategy
Expand Down Expand Up @@ -65,11 +66,10 @@ Solve shortest path problem using Dijkstra algorithm
static QgsGraph *shortestTree( const QgsGraph *source, int startVertexIdx, int criterionNum );
%Docstring
Returns shortest path tree with root-node in startVertexIdx

:param source: source graph
:param startVertexIdx: index of the start vertex
:param criterionNum: index of the optimization strategy

:rtype: QgsGraph
%End
};

Expand Down
2 changes: 0 additions & 2 deletions python/analysis/network/qgsgraphbuilder.sip
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ MANDATORY BUILDER PROPERTY DECLARATION
QgsGraph *graph() /Factory/;
%Docstring
Returns generated QgsGraph

:rtype: QgsGraph
%End

};
Expand Down
11 changes: 3 additions & 8 deletions python/analysis/network/qgsgraphbuilderinterface.sip
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ QgsGraphBuilder and QgsGraphDirector both use a "builder" design pattern
QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled = true, double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" );
%Docstring
Default constructor

:param crs: Coordinate reference system for new graph vertex
:param ctfEnabled: enable coordinate transform from source graph CRS to CRS graph
:param topologyTolerance: sqrt distance between source point as one graph vertex
Expand All @@ -45,34 +46,27 @@ Default constructor
QgsCoordinateReferenceSystem destinationCrs() const;
%Docstring
Returns destinaltion CRS

:rtype: QgsCoordinateReferenceSystem
%End

bool coordinateTransformationEnabled();
%Docstring
Returns coordinate transformation enabled

:rtype: bool
%End

double topologyTolerance();
%Docstring
Returns topology tolerance

:rtype: float
%End

QgsDistanceArea *distanceArea();
%Docstring
Returns measurement tool

:rtype: QgsDistanceArea
%End

virtual void addVertex( int id, const QgsPointXY &pt );
%Docstring
Add vertex to the graph

:param id: vertex identifier
:param pt: vertex coordinates

Expand All @@ -84,6 +78,7 @@ Add vertex to the graph
virtual void addEdge( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &strategies );
%Docstring
Add edge to the graph

:param pt1id: first vertex identificator
:param pt1: first vertex coordinates
:param pt2id: second vertex identificator
Expand Down
2 changes: 0 additions & 2 deletions python/analysis/network/qgsgraphdirector.sip
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ Add optimization strategy
virtual QString name() const = 0;
%Docstring
Returns director name

:rtype: str
%End

protected:
Expand Down
4 changes: 0 additions & 4 deletions python/analysis/network/qgsnetworkstrategy.sip
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,11 @@ Default constructor
%Docstring
Returns a list of the source layer attributes needed for cost calculation.
This is method called by QgsGraphDirector.

:rtype: set of int
%End

virtual QVariant cost( double distance, const QgsFeature &f ) const = 0;
%Docstring
Returns edge cost

:rtype: QVariant
%End
};

Expand Down
1 change: 1 addition & 0 deletions python/analysis/network/qgsvectorlayerdirector.sip
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class QgsVectorLayerDirector : QgsGraphDirector
);
%Docstring
Default constructor

:param source: feature source representing network
:param directionFieldId: field containing direction value
:param directDirectionValue: value for direct one-way road
Expand Down
Loading