Skip to content

Commit

Permalink
Better repr for QgsProcessingFeatureSourceDefinition
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 28, 2020
1 parent 865aa93 commit a06e707
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/core/additions/processing.py
Expand Up @@ -20,8 +20,12 @@

# add some __repr__ methods to processing classes
def processing_source_repr(self):
return "<QgsProcessingFeatureSourceDefinition {{'source':{}, 'selectedFeaturesOnly': {}}}>".format(
self.source.staticValue(), self.selectedFeaturesOnly)
if self.featureLimit != -1:
return "<QgsProcessingFeatureSourceDefinition {{'source':{}, 'selectedFeaturesOnly': {}, 'featureLimit': {}}}>".format(
self.source.staticValue(), self.selectedFeaturesOnly, self.featureLimit)
else:
return "<QgsProcessingFeatureSourceDefinition {{'source':{}, 'selectedFeaturesOnly': {}}}>".format(
self.source.staticValue(), self.selectedFeaturesOnly)


def processing_output_layer_repr(self):
Expand Down

0 comments on commit a06e707

Please sign in to comment.