Skip to content

Commit f996c54

Browse files
committedOct 30, 2015
indentation update
1 parent 3a93ca6 commit f996c54

File tree

16 files changed

+70
-66
lines changed

16 files changed

+70
-66
lines changed
 

‎python/plugins/GdalTools/tools/GdalTools_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ def getRasterResolution(fileName):
387387
# 3. bypass the following bug:
388388
# when you use the 'filter' argument, the dialog is enlarged up to the longest filter length,
389389
# so sometimes the dialog excedes the screen width
390+
391+
390392
class FileDialog:
391393

392394
@classmethod

‎python/plugins/GdalTools/tools/doClipper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
from widgetPluginBase import GdalToolsBasePluginWidget as BasePluginWidget
3232
import GdalTools_utils as Utils
3333

34+
3435
class GdalToolsDialog(QWidget, Ui_Widget, BasePluginWidget):
3536

3637
def __init__(self, iface):
@@ -94,7 +95,7 @@ def switchResolutionMode(self):
9495
self.resolutionWidget.hide()
9596
else:
9697
self.resolutionWidget.show()
97-
98+
9899
def checkRun(self):
99100
if self.extentModeRadio.isChecked():
100101
enabler = self.extentSelector.isCoordsValid()

‎python/plugins/processing/algs/gdal/ClipByExtent.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class ClipByExtent(GdalAlgorithm):
5656
BIGTIFFTYPE = ['', 'YES', 'NO', 'IF_NEEDED', 'IF_SAFER']
5757
COMPRESSTYPE = ['NONE', 'JPEG', 'LZW', 'PACKBITS', 'DEFLATE']
5858
TFW = 'TFW'
59-
59+
6060
def defineCharacteristics(self):
6161
self.name, self.i18n_name = self.trAlgorithm('Clip raster by extent')
6262
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Extraction')
@@ -69,26 +69,26 @@ def defineCharacteristics(self):
6969

7070
params = []
7171
params.append(ParameterSelection(self.RTYPE,
72-
self.tr('Output raster type'), self.TYPE, 5))
72+
self.tr('Output raster type'), self.TYPE, 5))
7373
params.append(ParameterSelection(self.COMPRESS,
74-
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
74+
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
7575
params.append(ParameterNumber(self.JPEGCOMPRESSION,
76-
self.tr('Set the JPEG compression level'),
77-
1, 100, 75))
76+
self.tr('Set the JPEG compression level'),
77+
1, 100, 75))
7878
params.append(ParameterNumber(self.ZLEVEL,
79-
self.tr('Set the DEFLATE compression level'),
80-
1, 9, 6))
79+
self.tr('Set the DEFLATE compression level'),
80+
1, 9, 6))
8181
params.append(ParameterNumber(self.PREDICTOR,
82-
self.tr('Set the predictor for LZW or DEFLATE compression'),
83-
1, 3, 1))
82+
self.tr('Set the predictor for LZW or DEFLATE compression'),
83+
1, 3, 1))
8484
params.append(ParameterBoolean(self.TILED,
85-
self.tr('Create tiled output (only used for the GTiff format)'), False))
85+
self.tr('Create tiled output (only used for the GTiff format)'), False))
8686
params.append(ParameterSelection(self.BIGTIFF,
87-
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
87+
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
8888
params.append(ParameterBoolean(self.TFW,
89-
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
89+
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
9090
params.append(ParameterString(self.EXTRA,
91-
self.tr('Additional creation parameters'), '', optional=True))
91+
self.tr('Additional creation parameters'), '', optional=True))
9292

9393
for param in params:
9494
param.isAdvanced = True
@@ -113,7 +113,7 @@ def getConsoleCommands(self):
113113
arguments.append('-of')
114114
arguments.append(GdalUtils.getFormatShortNameFromFilename(out))
115115
arguments.append('-ot')
116-
arguments.append(self.TYPE[self.getParameterValue(self.RTYPE)])
116+
arguments.append(self.TYPE[self.getParameterValue(self.RTYPE)])
117117
if len(noData) > 0:
118118
arguments.append('-a_nodata')
119119
arguments.append(noData)

‎python/plugins/processing/algs/gdal/ClipByMask.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
from processing.algs.gdal.GdalUtils import GdalUtils
4343

4444

45-
class ClipByMask(GdalAlgorithm,OgrAlgorithm):
45+
class ClipByMask(GdalAlgorithm, OgrAlgorithm):
4646

4747
INPUT = 'INPUT'
4848
OUTPUT = 'OUTPUT'
@@ -63,7 +63,7 @@ class ClipByMask(GdalAlgorithm,OgrAlgorithm):
6363
BIGTIFFTYPE = ['', 'YES', 'NO', 'IF_NEEDED', 'IF_SAFER']
6464
COMPRESSTYPE = ['NONE', 'JPEG', 'LZW', 'PACKBITS', 'DEFLATE']
6565
TFW = 'TFW'
66-
66+
6767
def defineCharacteristics(self):
6868
self.name, self.i18n_name = self.trAlgorithm('Clip raster by mask layer')
6969
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Extraction')
@@ -82,30 +82,30 @@ def defineCharacteristics(self):
8282

8383
params = []
8484
params.append(ParameterSelection(self.RTYPE,
85-
self.tr('Output raster type'), self.TYPE, 5))
85+
self.tr('Output raster type'), self.TYPE, 5))
8686
params.append(ParameterSelection(self.COMPRESS,
87-
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
87+
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
8888
params.append(ParameterNumber(self.JPEGCOMPRESSION,
89-
self.tr('Set the JPEG compression level'),
90-
1, 100, 75))
89+
self.tr('Set the JPEG compression level'),
90+
1, 100, 75))
9191
params.append(ParameterNumber(self.ZLEVEL,
92-
self.tr('Set the DEFLATE compression level'),
93-
1, 9, 6))
92+
self.tr('Set the DEFLATE compression level'),
93+
1, 9, 6))
9494
params.append(ParameterNumber(self.PREDICTOR,
95-
self.tr('Set the predictor for LZW or DEFLATE compression'),
96-
1, 3, 1))
95+
self.tr('Set the predictor for LZW or DEFLATE compression'),
96+
1, 3, 1))
9797
params.append(ParameterBoolean(self.TILED,
98-
self.tr('Create tiled output (only used for the GTiff format)'), False))
98+
self.tr('Create tiled output (only used for the GTiff format)'), False))
9999
params.append(ParameterSelection(self.BIGTIFF,
100-
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
100+
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
101101
params.append(ParameterBoolean(self.TFW,
102-
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
102+
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
103103
params.append(ParameterString(self.EXTRA,
104-
self.tr('Additional creation parameters'), '', optional=True))
104+
self.tr('Additional creation parameters'), '', optional=True))
105105

106106
for param in params:
107107
param.isAdvanced = True
108-
self.addParameter(param)
108+
self.addParameter(param)
109109

110110
self.addOutput(OutputRaster(self.OUTPUT, self.tr('Clipped (mask)')))
111111

@@ -153,7 +153,7 @@ def getConsoleCommands(self):
153153

154154
if addAlphaBand:
155155
arguments.append('-dstalpha')
156-
156+
157157
if len(extra) > 0:
158158
arguments.append(extra)
159159
if GdalUtils.getFormatShortNameFromFilename(out) == "GTiff":

‎python/plugins/processing/algs/gdal/ogrsql.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
DIALECTS = [None, 'ogrsql', 'sqlite']
3939

40+
4041
class OgrSql(OgrAlgorithm):
4142

4243
INPUT = 'INPUT'

‎python/plugins/processing/algs/gdal/rasterize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def defineCharacteristics(self):
101101
self.addParameter(ParameterBoolean(self.TFW,
102102
self.tr('Force the generation of an associated ESRI world file (.tfw)'), False))
103103
params.append(ParameterString(self.EXTRA,
104-
self.tr('Additional creation parameters'), '', optional=True))
104+
self.tr('Additional creation parameters'), '', optional=True))
105105

106106
for param in params:
107107
param.isAdvanced = True
@@ -122,7 +122,7 @@ def getConsoleCommands(self):
122122
bigtiff = self.BIGTIFFTYPE[self.getParameterValue(self.BIGTIFF)]
123123
tfw = unicode(self.getParameterValue(self.TFW))
124124
out = self.getOutputValue(self.OUTPUT)
125-
extra = unicode(self.getParameterValue(self.EXTRA))
125+
extra = unicode(self.getParameterValue(self.EXTRA))
126126

127127
arguments = []
128128
arguments.append('-a')

‎python/plugins/processing/algs/gdal/translate.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,26 +90,26 @@ def defineCharacteristics(self):
9090

9191
params = []
9292
params.append(ParameterSelection(self.RTYPE,
93-
self.tr('Output raster type'), self.TYPE, 5))
93+
self.tr('Output raster type'), self.TYPE, 5))
9494
params.append(ParameterSelection(self.COMPRESS,
95-
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
95+
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
9696
params.append(ParameterNumber(self.JPEGCOMPRESSION,
97-
self.tr('Set the JPEG compression level'),
98-
1, 100, 75))
97+
self.tr('Set the JPEG compression level'),
98+
1, 100, 75))
9999
params.append(ParameterNumber(self.ZLEVEL,
100-
self.tr('Set the DEFLATE compression level'),
101-
1, 9, 6))
100+
self.tr('Set the DEFLATE compression level'),
101+
1, 9, 6))
102102
params.append(ParameterNumber(self.PREDICTOR,
103-
self.tr('Set the predictor for LZW or DEFLATE compression'),
104-
1, 3, 1))
103+
self.tr('Set the predictor for LZW or DEFLATE compression'),
104+
1, 3, 1))
105105
params.append(ParameterBoolean(self.TILED,
106-
self.tr('Create tiled output (only used for the GTiff format)'), False))
106+
self.tr('Create tiled output (only used for the GTiff format)'), False))
107107
params.append(ParameterSelection(self.BIGTIFF,
108-
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
108+
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
109109
params.append(ParameterBoolean(self.TFW,
110-
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
110+
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
111111
params.append(ParameterString(self.EXTRA,
112-
self.tr('Additional creation parameters'), '', optional=True))
112+
self.tr('Additional creation parameters'), '', optional=True))
113113

114114
for param in params:
115115
param.isAdvanced = True

‎python/plugins/processing/algs/gdal/warp.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,26 +78,26 @@ def defineCharacteristics(self):
7878

7979
params = []
8080
params.append(ParameterSelection(self.RTYPE,
81-
self.tr('Output raster type'), self.TYPE, 5))
81+
self.tr('Output raster type'), self.TYPE, 5))
8282
params.append(ParameterSelection(self.COMPRESS,
83-
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
83+
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
8484
params.append(ParameterNumber(self.JPEGCOMPRESSION,
85-
self.tr('Set the JPEG compression level'),
86-
1, 100, 75))
85+
self.tr('Set the JPEG compression level'),
86+
1, 100, 75))
8787
params.append(ParameterNumber(self.ZLEVEL,
88-
self.tr('Set the DEFLATE compression level'),
89-
1, 9, 6))
88+
self.tr('Set the DEFLATE compression level'),
89+
1, 9, 6))
9090
params.append(ParameterNumber(self.PREDICTOR,
91-
self.tr('Set the predictor for LZW or DEFLATE compression'),
92-
1, 3, 1))
91+
self.tr('Set the predictor for LZW or DEFLATE compression'),
92+
1, 3, 1))
9393
params.append(ParameterBoolean(self.TILED,
94-
self.tr('Create tiled output (only used for the GTiff format)'), False))
94+
self.tr('Create tiled output (only used for the GTiff format)'), False))
9595
params.append(ParameterSelection(self.BIGTIFF,
96-
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
96+
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
9797
params.append(ParameterBoolean(self.TFW,
98-
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
98+
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
9999
params.append(ParameterString(self.EXTRA,
100-
self.tr('Additional creation parameters'), '', optional=True))
100+
self.tr('Additional creation parameters'), '', optional=True))
101101

102102
for param in params:
103103
param.isAdvanced = True

‎python/plugins/processing/algs/saga/SagaAlgorithm212.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def processAlgorithm(self, progress):
195195
f.write('\t'.join([col for col in param.cols]) + '\n')
196196
values = param.value.split(',')
197197
for i in range(0, len(values), 3):
198-
s = values[i] + '\t' + values[i + 1] + '\t' + values[i+ 2] + '\n'
198+
s = values[i] + '\t' + values[i + 1] + '\t' + values[i + 2] + '\n'
199199
f.write(s)
200200
f.close()
201201
command += ' -' + param.name + ' "' + tempTableFile + '"'

‎python/plugins/processing/core/ProcessingConfig.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from processing.tools.system import tempFolder
3333
import processing.tools.dataobjects
3434

35+
3536
class ProcessingConfig:
3637

3738
OUTPUT_FOLDER = 'OUTPUT_FOLDER'

‎python/plugins/processing/core/outputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
from processing.tools import dataobjects
3232
from processing.core.ProcessingConfig import ProcessingConfig
3333

34+
3435
def getOutputFromString(s):
3536
tokens = s.split("|")
3637
params = [t if unicode(t) != "None" else None for t in tokens[1:]]
@@ -152,7 +153,6 @@ class OutputRaster(Output):
152153

153154
compatible = None
154155

155-
156156
def getFileFilter(self, alg):
157157
exts = dataobjects.getSupportedOutputRasterLayerExtensions()
158158
for i in range(len(exts)):

‎python/plugins/processing/gui/ConfigDialog.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ def createEditor(
213213
elif isinstance(value, (str, unicode)):
214214
return QLineEdit(parent)
215215

216-
217216
def setEditorData(self, editor, index):
218217
value = self.convertValue(index.model().data(index, Qt.EditRole))
219218
setting = index.model().data(index, Qt.UserRole)

‎python/plugins/processing/tools/vector.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,9 @@ def snapToPrecision(geom, precision):
389389
i = 0
390390
p = snapped.vertexAt(i)
391391
while p.x() != 0.0 and p.y() != 0.0:
392-
x = round(p.x() / precision,0) * precision
393-
y = round(p.y() / precision,0) * precision
394-
snapped.moveVertex(x,y,i)
392+
x = round(p.x() / precision, 0) * precision
393+
y = round(p.y() / precision, 0) * precision
394+
snapped.moveVertex(x, y, i)
395395
i = i + 1
396396
p = snapped.vertexAt(i)
397397
return snapped

‎src/app/qgswelcomepageitemsmodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ QSize QgsWelcomePageItemDelegate::sizeHint( const QStyleOptionViewItem & option,
114114
index.data( QgsWelcomePageItemsModel::CrsRole ).toString() ) );
115115
doc.setTextWidth( width - ( !icon.isNull() ? icon.width() + 35 : 35 ) );
116116

117-
return QSize( width, qMax( ( double ) doc.size().height() + 10, ( double )icon.height() ) + 20 );
117+
return QSize( width, qMax(( double ) doc.size().height() + 10, ( double )icon.height() ) + 20 );
118118
}
119119

120120
QgsWelcomePageItemsModel::QgsWelcomePageItemsModel( QObject* parent )

‎src/core/qgsexpression.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ static QVariant fcnRelate( const QVariantList& values, const QgsExpressionContex
14871487
QString result = engine->relate( *sGeom.geometry() );
14881488
delete engine;
14891489

1490-
return QVariant::fromValue( result );
1490+
return QVariant::fromValue( result );
14911491
}
14921492

14931493
static QVariant fcnBbox( const QVariantList& values, const QgsExpressionContext*, QgsExpression* parent )

‎src/server/qgswmsconfigparser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ QgsComposition* QgsWMSConfigParser::createPrintComposition( const QString& compo
148148
{
149149
styleName = wmsStyleList.at( i );
150150
}
151-
151+
152152
bool allowCaching = true;
153153
if ( wmsLayerList.count( wmsLayer ) > 1 )
154154
{

0 commit comments

Comments
 (0)
Please sign in to comment.