Skip to content

Commit 1dad149

Browse files
committed
[sextante] some light code cleaning/polishing
1 parent 17bdba9 commit 1dad149

File tree

8 files changed

+11
-18
lines changed

8 files changed

+11
-18
lines changed

python/plugins/sextante/algs/QGISAlgorithmProvider.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ def __init__(self):
133133
AutoincrementalField(), Explode(), FieldsPyculator(), EquivalentNumField(),
134134
PointsLayerFromTable(), StatisticsByCategories(), Polygonize(),
135135
# ------ raster ------
136-
CreateConstantRaster(), RasterLayerStatistics()
136+
#CreateConstantRaster(),
137+
RasterLayerStatistics()
137138
# ------ graphics ------
138139
#VectorLayerHistogram(), VectorLayerScatterplot(), RasterLayerHistogram(),
139140
#MeanAndStdDevPlot(), BarPlot(), PolarPlot()

python/plugins/sextante/core/QGisLayers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* *
1717
***************************************************************************
1818
"""
19-
from sextante.gdal.GdalUtils import GdalUtils
2019

2120
__author__ = 'Victor Olaya'
2221
__date__ = 'August 2012'
@@ -29,6 +28,8 @@
2928
from PyQt4.QtGui import *
3029
from os import path
3130
from sextante.core.SextanteConfig import SextanteConfig
31+
from sextante.gdal.GdalUtils import GdalUtils
32+
3233

3334
class QGisLayers:
3435
'''This class contains method to communicate SEXTANTE with the QGIS interface,

python/plugins/sextante/core/SextanteLog.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,6 @@ def getLogEntries():
8787
algorithms=[]
8888
warnings=[]
8989
info=[]
90-
#lines = codecs.open(SextanteLog.logFilename(), encoding='utf-8')
91-
#=======================================================================
92-
# lines = open(SextanteLog.logFilename())
93-
# line = lines.readline()
94-
# while line != "":
95-
#=======================================================================
9690
lines = tail(SextanteLog.logFilename())
9791
for line in lines:
9892
line = line.strip("\n").strip()
@@ -108,8 +102,7 @@ def getLogEntries():
108102
warnings.append(LogEntry(tokens[1], text))
109103
elif line.startswith(SextanteLog.LOG_INFO):
110104
info.append(LogEntry(tokens[1], text))
111-
#line = lines.readline()
112-
#lines.close()
105+
113106
entries[SextanteLog.LOG_ERROR] = errors
114107
entries[SextanteLog.LOG_ALGORITHM] = algorithms
115108
entries[SextanteLog.LOG_INFO] = info
@@ -136,7 +129,6 @@ def __init__(self, date, text):
136129
self.text = text
137130

138131
import re
139-
import time
140132

141133
#===============================================================================
142134

python/plugins/sextante/gui/BatchInputSelectionPanel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
__copyright__ = '(C) 2012, Victor Olaya'
2323
# This will get replaced with a git SHA1 when you do a git archive
2424
__revision__ = '$Format:%H$'
25+
2526
import os
2627
from PyQt4 import QtGui, QtCore
2728
from sextante.parameters.ParameterMultipleInput import ParameterMultipleInput

python/plugins/sextante/gui/ConfigDialog.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,18 @@
1616
* *
1717
***************************************************************************
1818
"""
19-
import os
20-
from PyQt4 import QtGui
2119

2220
__author__ = 'Victor Olaya'
2321
__date__ = 'August 2012'
2422
__copyright__ = '(C) 2012, Victor Olaya'
2523
# This will get replaced with a git SHA1 when you do a git archive
2624
__revision__ = '$Format:%H$'
2725

26+
import os
27+
from PyQt4 import QtGui
2828
from PyQt4.QtCore import *
2929
from PyQt4.QtGui import *
30-
3130
from sextante.core.SextanteConfig import SextanteConfig
32-
3331
from sextante.ui.ui_DlgConfig import Ui_DlgConfig
3432

3533
class ConfigDialog(QDialog, Ui_DlgConfig):
@@ -53,7 +51,7 @@ def __init__(self, toolbox):
5351

5452
def edit(self, item, column):
5553
if column > 0:
56-
self.tree.editItem(item, column)
54+
self.tree.editItem(item, column)
5755

5856
def fillTree(self):
5957
self.items = {}

python/plugins/sextante/gui/CouldNotLoadResultsDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* *
1717
***************************************************************************
1818
"""
19-
import webbrowser
2019

2120
__author__ = 'Victor Olaya'
2221
__date__ = 'August 2012'
@@ -27,6 +26,7 @@
2726
from PyQt4 import QtCore, QtGui, QtWebKit
2827
from PyQt4.QtCore import *
2928
from PyQt4.QtGui import *
29+
import webbrowser
3030

3131
class CouldNotLoadResultsDialog(QtGui.QDialog):
3232
def __init__(self, wrongLayers, alg):

python/plugins/sextante/gui/Help2Html.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import pickle
2727
from sextante.core.SextanteUtils import SextanteUtils
2828
import os
29+
2930
class Help2Html():
3031

3132
ALG_DESC = "ALG_DESC"

python/plugins/sextante/gui/HelpEditionDialog.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
import os
2727
import pickle
28-
2928
from PyQt4.QtCore import *
3029
from PyQt4.QtGui import *
3130

0 commit comments

Comments
 (0)