Skip to content

Commit 3407ced

Browse files
alexbruyvolaya
authored andcommitted
fix indentation
Conflicts: python/plugins/processing/gui/BatchInputSelectionPanel.py python/plugins/processing/gui/wrappers.py
1 parent a20c86c commit 3407ced

22 files changed

+114
-113
lines changed

python/plugins/processing/algs/gdal/GdalAlgorithmDialog.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self, alg):
4040
AlgorithmDialogBase.__init__(self, alg)
4141

4242
self.alg = alg
43-
43+
4444
self.setMainWidget(GdalParametersPanel(self, alg))
4545

4646
cornerWidget = QWidget()
@@ -55,6 +55,7 @@ def __init__(self, alg):
5555

5656
self.mainWidget.parametersHaveChanged()
5757

58+
5859
class GdalParametersPanel(ParametersPanel):
5960

6061
def __init__(self, parent, alg):

python/plugins/processing/algs/grass/GrassAlgorithm.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ def defineCharacteristicsFromFile(self):
166166
" (raw output)", "txt"))
167167
line = lines.readline().strip('\n').strip()
168168
except Exception as e:
169-
169+
170170
ProcessingLog.addToLog(
171171
ProcessingLog.LOG_ERROR,
172172
traceback.format_exc())
173-
#self.tr('Could not open GRASS algorithm: %s.\n%s' % (self.descriptionFile, line)))
173+
#self.tr('Could not open GRASS algorithm: %s.\n%s' % (self.descriptionFile, line)))
174174
raise e
175175
lines.close()
176176

python/plugins/processing/algs/qgis/DeleteColumn.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def defineCharacteristics(self):
5151

5252
def processAlgorithm(self, progress):
5353
layer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT))
54-
54+
5555
toDelete = self.getParameterValue(self.COLUMNS)
5656
fields = layer.fields()
5757
idxs = []

python/plugins/processing/algs/qgis/Dissolve.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def defineCharacteristics(self):
6363
self.addParameter(ParameterBoolean(Dissolve.DISSOLVE_ALL,
6464
self.tr('Dissolve all (do not use fields)'), True))
6565
self.addParameter(ParameterTableField(Dissolve.FIELD,
66-
self.tr('Unique ID fields'), Dissolve.INPUT, optional=True, multiple=True))
66+
self.tr('Unique ID fields'), Dissolve.INPUT, optional=True, multiple=True))
6767
self.addOutput(OutputVector(Dissolve.OUTPUT, self.tr('Dissolved')))
6868

6969
def processAlgorithm(self, progress):

python/plugins/processing/algs/r/RAlgorithm.py

-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ def processParameterLine(self, line):
187187
raise WrongScriptException(
188188
self.tr('Could not load R script: %s.\n Problem with line %s' % (self.descriptionFile, line)))
189189

190-
191190
def processAlgorithm(self, progress):
192191
if isWindows():
193192
path = RUtils.RFolder()

python/plugins/processing/core/GeoAlgorithm.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ def __init__(self):
7373
self.showInToolbox = True
7474
self.showInModeler = True
7575

76-
7776
# False if it should not be run a a batch process
7877
self.canRunInBatchMode = True
7978

@@ -333,7 +332,7 @@ def evaluateParameterValues(self):
333332
except ValueError, e:
334333
traceback.print_exc()
335334
raise GeoAlgorithmExecutionException(str(e))
336-
335+
337336
def resolveOutputs(self):
338337
"""Sets temporary outputs (output.value = None) with a
339338
temporary file instead. Resolves expressions as well.
@@ -343,7 +342,7 @@ def resolveOutputs(self):
343342
out.resolveValue(self)
344343
except ValueError, e:
345344
raise GeoAlgorithmExecutionException(str(e))
346-
345+
347346
def setOutputCRS(self):
348347
layers = dataobjects.getAllLayers()
349348
for param in self.parameters:

python/plugins/processing/core/outputs.py

+12-11
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
from qgis.core import QgsExpressionContext, QgsExpressionContextUtils, QgsExpression, QgsExpressionContextScope
4242

43+
4344
def _expressionContext(alg):
4445
context = QgsExpressionContext()
4546
context.appendScope(QgsExpressionContextUtils.globalScope())
@@ -50,6 +51,7 @@ def _expressionContext(alg):
5051
context.appendScope(processingScope)
5152
return context
5253

54+
5355
class Output(object):
5456

5557
def __init__(self, name='', description='', hidden=False):
@@ -93,17 +95,17 @@ def setValue(self, value):
9395
return True
9496
except:
9597
return False
96-
98+
9799
def _resolveTemporary(self, alg):
98100
ext = self.getDefaultFileExtension()
99101
return getTempFilenameInTempFolder(self.name + '.' + ext)
100-
102+
101103
def _supportedExtensions(self):
102104
return []
103-
105+
104106
def resolveValue(self, alg):
105107
if not self.hidden and not bool(self.value):
106-
self.value = self._resolveTemporary(alg)
108+
self.value = self._resolveTemporary(alg)
107109
else:
108110
exp = QgsExpression(self.value)
109111
if not exp.hasParserError():
@@ -113,7 +115,7 @@ def resolveValue(self, alg):
113115

114116
if ":" not in self.value:
115117
if not os.path.isabs(self.value):
116-
self.value = os.path.join(ProcessingConfig.getSetting(ProcessingConfig.OUTPUT_FOLDER),
118+
self.value = os.path.join(ProcessingConfig.getSetting(ProcessingConfig.OUTPUT_FOLDER),
117119
self.value)
118120
supported = self._supportedExtensions()
119121
if supported:
@@ -138,7 +140,7 @@ def tr(self, string, context=''):
138140

139141

140142
class OutputDirectory(Output):
141-
143+
142144
def resolveValue(self, alg):
143145
self.value = getTempDirInTempFolder()
144146

@@ -330,7 +332,6 @@ def getDefaultFileExtension(self):
330332
default = 'dbf'
331333
return default
332334

333-
334335
def getCompatibleFileName(self, alg):
335336
"""Returns a filename that is compatible with the algorithm
336337
that is going to generate this output.
@@ -389,7 +390,7 @@ def _resolveTemporary(self, alg):
389390
else:
390391
ext = self.getDefaultFileExtension()
391392
return getTempFilenameInTempFolder(self.name + '.' + ext)
392-
393+
393394

394395
def getOutputFromString(s):
395396
try:
@@ -402,7 +403,7 @@ def getOutputFromString(s):
402403
tokens = s.split("=")
403404
token = tokens[1].strip()[len('output') + 1:]
404405
out = None
405-
406+
406407
if token.lower().strip().startswith('raster'):
407408
out = OutputRaster()
408409
elif token.lower().strip() == 'vector':
@@ -430,7 +431,7 @@ def getOutputFromString(s):
430431
out = OutputString()
431432
elif token.lower().strip().startswith('extent'):
432433
out = OutputExtent()
433-
434+
434435
return out
435436
except:
436-
return None
437+
return None

0 commit comments

Comments
 (0)