Skip to content

Commit a51fd5f

Browse files
committed
indentation update
1 parent cfe43dc commit a51fd5f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+622
-622
lines changed

python/plugins/sextante/algs/ftools/ConvexHull.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def processAlgorithm(self, progress):
7171
GEOS_EXCEPT = True
7272
FEATURE_EXCEPT = True
7373

74-
74+
7575
f = QgsField("value")
7676
f.setType(QVariant.String)
7777
f.setLength(255)

python/plugins/sextante/algs/ftools/ReprojectLayer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ def processAlgorithm(self, progress):
7979
progress.setPercentage(int(current * total))
8080

8181
del writer
82-
82+
8383
self.crs = targetCrs

python/plugins/sextante/gdal/OgrAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def ogrConnectionString(self, uri):
4747
layer = QGisLayers.getObjectFromUri(uri, False)
4848
if layer == None:
4949
return uri;
50-
provider = layer.dataProvider().name()
50+
provider = layer.dataProvider().name()
5151
if provider == 'spatialite':
5252
#dbname='/geodata/osm_ch.sqlite' table="places" (Geometry) sql=
5353
regex = re.compile("dbname='(.+)'")

python/plugins/sextante/gdal/ogr2ogr.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,47 +62,47 @@ def defineCharacteristics(self):
6262

6363
#we add the input vector layer. It can have any kind of geometry
6464
#It is a mandatory (not optional) one, hence the False argument
65-
self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", ParameterVector.VECTOR_TYPE_ANY, False))
66-
self.addParameter(ParameterSelection(self.DEST_FORMAT, "Destination Format", FORMATS))
67-
self.addParameter(ParameterString(self.DEST_DSCO, "Creation Options", ""))
65+
self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", ParameterVector.VECTOR_TYPE_ANY, False))
66+
self.addParameter(ParameterSelection(self.DEST_FORMAT, "Destination Format", FORMATS))
67+
self.addParameter(ParameterString(self.DEST_DSCO, "Creation Options", ""))
6868

6969
self.addOutput(OutputVector(self.OUTPUT_LAYER, "Output layer"))
7070

7171
def processAlgorithm(self, progress):
7272
'''Here is where the processing itself takes place'''
7373

7474
if not gdalAvailable:
75-
raise GeoAlgorithmExecutionException("GDAL bindings not installed.")
75+
raise GeoAlgorithmExecutionException("GDAL bindings not installed.")
7676

7777
input = self.getParameterValue(self.INPUT_LAYER)
7878
ogrLayer = self.ogrConnectionString(input)
79-
79+
8080
output = self.getOutputFromName(self.OUTPUT_LAYER)
8181
outfile = output.value
82-
82+
8383
formatIdx = self.getParameterValue(self.DEST_FORMAT)
84-
84+
8585
ext = EXTS[formatIdx]
8686
if not outfile.endswith(ext):
8787
outfile = outfile + ext;
8888
output.value = outfile
89-
89+
9090
dst_ds = self.ogrConnectionString(outfile)
9191
dst_format = FORMATS[formatIdx]
92-
ogr_dsco = [self.getParameterValue(self.DEST_DSCO)]
93-
92+
ogr_dsco = [self.getParameterValue(self.DEST_DSCO)]
93+
9494
poDS = ogr.Open( ogrLayer, False )
9595
if poDS is None:
96-
raise GeoAlgorithmExecutionException(self.failure(ogrLayer))
97-
96+
raise GeoAlgorithmExecutionException(self.failure(ogrLayer))
97+
9898
if dst_format == "SQLite" and os.path.isfile(dst_ds):
99-
os.remove(dst_ds)
99+
os.remove(dst_ds)
100100
driver = ogr.GetDriverByName(str(dst_format))
101101
poDstDS = driver.CreateDataSource(dst_ds, options = ogr_dsco)
102102
if poDstDS is None:
103103
raise GeoAlgorithmExecutionException("Error creating %s" % dst_ds)
104104
return
105-
self.ogrtransform(poDS, poDstDS, bOverwrite = True)
105+
self.ogrtransform(poDS, poDstDS, bOverwrite = True)
106106

107107

108108
def ogrtransform(self,
@@ -141,7 +141,7 @@ def ogrtransform(self,
141141
poLayer = poSrcDS.GetLayer(iLayer)
142142

143143
if poLayer is None:
144-
raise GeoAlgorithmExecutionException( "FAILURE: Couldn't fetch advertised layer %d!" % iLayer)
144+
raise GeoAlgorithmExecutionException( "FAILURE: Couldn't fetch advertised layer %d!" % iLayer)
145145

146146
papoLayers[iLayer] = poLayer
147147
iLayer = iLayer + 1
@@ -156,12 +156,12 @@ def ogrtransform(self,
156156
poLayer = poSrcDS.GetLayerByName(layername)
157157

158158
if poLayer is None:
159-
raise GeoAlgorithmExecutionException("FAILURE: Couldn't fetch advertised layer %s!" % layername)
159+
raise GeoAlgorithmExecutionException("FAILURE: Couldn't fetch advertised layer %s!" % layername)
160160

161161
papoLayers[iLayer] = poLayer
162162
iLayer = iLayer + 1
163163

164-
for poSrcLayer in papoLayers:
164+
for poSrcLayer in papoLayers:
165165
ok = TranslateLayer( poSrcDS, poSrcLayer, poDstDS, papszLCO, pszNewLayerName, \
166166
bTransform, poOutputSRS, poSourceSRS, papszSelFields, \
167167
bAppend, eGType, bOverwrite, eGeomOp, dfGeomOpParam, \

python/plugins/sextante/grass/GrassAlgorithm.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def getIcon(self):
7878
return QIcon(os.path.dirname(__file__) + "/../images/grass.png")
7979

8080
def helpFile(self):
81-
return 'http://grass.osgeo.org/grass64/manuals/' + self.grassName + ".html"
81+
return 'http://grass.osgeo.org/grass64/manuals/' + self.grassName + ".html"
8282

8383
def getParameterDescriptions(self):
8484
descs = {}
@@ -293,8 +293,8 @@ def processAlgorithm(self, progress):
293293
command+= (" > " + out.value)
294294
else:
295295
command+=(" " + out.name + "=\"" + out.value + "\"");
296-
elif not isinstance(out, OutputHTML):
297-
#html files are not generated by GRASS, only by SEXTANTE to decorate grass output, so we skip them
296+
elif not isinstance(out, OutputHTML):
297+
#html files are not generated by GRASS, only by SEXTANTE to decorate grass output, so we skip them
298298
#An output name to make sure it is unique if the session uses this algorithm several times
299299
uniqueOutputName = out.name + uniqueSufix
300300
command += (" " + out.name + "=" + uniqueOutputName)
@@ -358,7 +358,7 @@ def postProcessResults(self):
358358

359359
def exportVectorLayer(self, orgFilename):
360360
#TODO: improve this. We are now exporting if it is not a shapefile,
361-
#but the functionality of v.in.ogr could be used for this.
361+
#but the functionality of v.in.ogr could be used for this.
362362
#We also export if there is a selection
363363
if not os.path.exists(orgFilename) or not orgFilename.endswith("shp"):
364364
layer = QGisLayers.getObjectFromUri(orgFilename, False)
@@ -427,12 +427,12 @@ def getTempFilename(self):
427427

428428
def commandLineName(self):
429429
return "grass:" + self.name[:self.name.find(" ")]
430-
430+
431431
def checkBeforeOpeningParametersDialog(self):
432432
msg = GrassUtils.checkGrassIsInstalled()
433-
if msg is not None:
434-
html = ("<p>This algorithm requires GRASS to be run."
435-
"Unfortunately, it seems that GRASS is not installed in your system, or it is not correctly configured to be used from QGIS</p>")
433+
if msg is not None:
434+
html = ("<p>This algorithm requires GRASS to be run."
435+
"Unfortunately, it seems that GRASS is not installed in your system, or it is not correctly configured to be used from QGIS</p>")
436436
html += '<p><a href= "http://docs.qgis.org/html/en/docs/user_manual/sextante/3rdParty.html">Click here</a> to know more about how to install and configure GRASS to be used with SEXTANTE</p>'
437437
return html
438438

python/plugins/sextante/grass/GrassAlgorithmProvider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ def initializeSettings(self):
4646
SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_FOLDER, "GRASS folder", GrassUtils.grassPath()))
4747
SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_WIN_SHELL, "Msys folder", GrassUtils.grassWinShell()))
4848
SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_LOG_COMMANDS, "Log execution commands", False))
49-
SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_LOG_CONSOLE, "Log console output", False))
49+
SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_LOG_CONSOLE, "Log console output", False))
5050

5151
def unload(self):
5252
AlgorithmProvider.unload(self)
5353
if SextanteUtils.isWindows() or SextanteUtils.isMac():
5454
SextanteConfig.removeSetting(GrassUtils.GRASS_FOLDER)
55-
SextanteConfig.removeSetting(GrassUtils.GRASS_WIN_SHELL)
55+
SextanteConfig.removeSetting(GrassUtils.GRASS_WIN_SHELL)
5656
SextanteConfig.removeSetting(GrassUtils.GRASS_LOG_COMMANDS)
5757
SextanteConfig.removeSetting(GrassUtils.GRASS_LOG_CONSOLE)
5858

python/plugins/sextante/grass/GrassUtils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class GrassUtils:
4343
GRASS_REGION_XMAX = "GRASS_REGION_XMAX"
4444
GRASS_REGION_YMAX = "GRASS_REGION_YMAX"
4545
GRASS_REGION_CELLSIZE = "GRASS_REGION_CELLSIZE"
46-
GRASS_FOLDER = "GRASS_FOLDER"
46+
GRASS_FOLDER = "GRASS_FOLDER"
4747
GRASS_WIN_SHELL = "GRASS_WIN_SHELL"
4848
GRASS_LOG_COMMANDS = "GRASS_LOG_COMMANDS"
4949
GRASS_LOG_CONSOLE = "GRASS_LOG_CONSOLE"
@@ -327,7 +327,7 @@ def checkGrassIsInstalled(ignoreRegistrySettings=False):
327327

328328
settings = QSettings()
329329
GRASS_INSTALLED = "/SextanteQGIS/GrassInstalled"
330-
if not ignoreRegistrySettings:
330+
if not ignoreRegistrySettings:
331331
if settings.contains(GRASS_INSTALLED):
332332
return
333333

python/plugins/sextante/gui/MissingDependencyDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def setupUi(self):
4040
layout = QVBoxLayout()
4141
webView = QtWebKit.QWebView()
4242
webView.page().setLinkDelegationPolicy(QtWebKit.QWebPage.DelegateAllLinks)
43-
webView.connect(webView, SIGNAL("linkClicked(const QUrl&)"), self.linkClicked)
43+
webView.connect(webView, SIGNAL("linkClicked(const QUrl&)"), self.linkClicked)
4444
webView.setHtml(self.msg)
4545
closeButton = QtGui.QPushButton()
4646
closeButton.setText("Close")

python/plugins/sextante/modeler/ModelerParametersDialog.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ def setParamTableFieldValue(self, param, widget):
651651
idx = widget.findText(widget.currentText())
652652
if idx < 0:
653653
name = self.getSafeNameForHarcodedParameter(param)
654-
value = AlgorithmAndParameter(AlgorithmAndParameter.PARENT_MODEL_ALGORITHM, name)
654+
value = AlgorithmAndParameter(AlgorithmAndParameter.PARENT_MODEL_ALGORITHM, name)
655655
s = str(widget.currentText()).strip()
656656
if s == "":
657657
if param.optional:
@@ -669,21 +669,21 @@ def setParamTableFieldValue(self, param, widget):
669669
return True
670670

671671
def setParamStringValue(self, param, widget):
672-
if param.multiline:
672+
if param.multiline:
673673
name = self.getSafeNameForHarcodedParameter(param)
674674
paramValue = AlgorithmAndParameter(AlgorithmAndParameter.PARENT_MODEL_ALGORITHM, name)
675675
value = widget.getValue()
676676
option = widget.getOption()
677-
if option == MultilineTextPanel.USE_TEXT:
677+
if option == MultilineTextPanel.USE_TEXT:
678678
if value == "":
679679
if param.optional:
680680
self.params[param.name] = None
681-
return True
681+
return True
682682
else:
683683
return False
684-
else:
684+
else:
685685
self.values[name] = value
686-
686+
687687
self.params[param.name] = paramValue
688688
else:
689689
self.params[param.name] = value

python/plugins/sextante/modeler/SaveAsPythonScriptAction.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def execute(self):
4646
if filename:
4747
if not filename.endswith(".py"):
4848
filename += ".py"
49-
text = self.translateToPythonCode(self.alg)
49+
text = self.translateToPythonCode(self.alg)
5050
try:
5151
fout = open(filename, "w")
5252
fout.write(text)
@@ -57,8 +57,8 @@ def execute(self):
5757
QMessageBox.warning(self,
5858
self.tr("I/O error"),
5959
self.tr("Unable to save edits. Reason:\n %1").arg(unicode(sys.exc_info()[1]))
60-
)
61-
60+
)
61+
6262
def translateToPythonCode(self, model):
6363
s = ["##" + model.name + "=name"]
6464
for param in model.parameters:
@@ -113,4 +113,4 @@ def translateToPythonCode(self, model):
113113
i += 1
114114
s += multiple
115115
s.append(str(runline + ")"))
116-
return "\n".join(s)
116+
return "\n".join(s)

0 commit comments

Comments
 (0)