Skip to content

Commit 8bea742

Browse files
committed
fix flake8 warnings
1 parent 55e7d93 commit 8bea742

File tree

6 files changed

+9
-12
lines changed

6 files changed

+9
-12
lines changed

python/plugins/MetaSearch/dialogs/maindialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
import json
3636
import os.path
37-
from urllib.request import build_opener, HTTPError, install_opener, HTTPBasicAuthHandler, HTTPHandler, ProxyHandler
37+
from urllib.request import build_opener, install_opener, ProxyHandler
3838

3939
from qgis.PyQt.QtCore import Qt
4040
from qgis.PyQt.QtWidgets import QApplication, QDialog, QDialogButtonBox, QMessageBox, QTreeWidgetItem, QWidget

python/plugins/processing/ProcessingPlugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
from processing.core.Processing import Processing
4141
from processing.gui.ProcessingToolbox import ProcessingToolbox
4242
from processing.gui.HistoryDialog import HistoryDialog
43-
from processing.gui.ConfigDialog import ConfigOptionsPage, ConfigDialog
43+
from processing.gui.ConfigDialog import ConfigOptionsPage
4444
from processing.gui.ResultsDock import ResultsDock
4545
from processing.gui.CommanderWindow import CommanderWindow
4646
from processing.modeler.ModelerDialog import ModelerDialog

python/plugins/processing/algs/qgis/scripts/Keep_n_biggest_parts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
##To_keep=number 1
55
##Biggest parts=output vector
66

7-
from qgis.core import Qgis, QgsGeometry, QgsWkbTypes
7+
from qgis.core import QgsGeometry, QgsWkbTypes
88
from operator import itemgetter
99

1010
To_keep = int(To_keep)

python/plugins/processing/gui/ConfigDialog.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
from qgis.PyQt import uic
3333
from qgis.PyQt.QtCore import Qt, QEvent
3434
from qgis.PyQt.QtWidgets import (QFileDialog,
35-
QDialog,
3635
QStyle,
3736
QMessageBox,
3837
QStyledItemDelegate,
@@ -41,12 +40,10 @@
4140
QToolButton,
4241
QHBoxLayout,
4342
QComboBox,
44-
QPushButton,
45-
QApplication)
43+
QPushButton)
4644
from qgis.PyQt.QtGui import (QIcon,
4745
QStandardItemModel,
48-
QStandardItem,
49-
QCursor)
46+
QStandardItem)
5047

5148
from qgis.gui import (QgsDoubleSpinBox,
5249
QgsSpinBox,

tests/src/python/test_qgsdelimitedtextprovider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ def deletefile(layer):
667667
try:
668668
os.remove(filename)
669669
except:
670-
file(filename, "w").close()
670+
open(filename, "w").close()
671671
assert os.path.getsize(filename) == 0, "removal and truncation of {} failed".format(filename)
672672
# print "Deleted file - sleeping"
673673
time.sleep(1)

tests/src/python/test_qgsmapthemecollection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def testThemeChanged(self):
6565
self.assertEqual(len(themes_changed_spy), 3)
6666
# remove valid
6767
collection.removeMapTheme('theme1')
68-
self.assertEqual(len(theme_changed_spy), 3) # not changed - removed!
68+
self.assertEqual(len(theme_changed_spy), 3) # not changed - removed!
6969
self.assertEqual(len(themes_changed_spy), 4)
7070

7171
# reinsert
@@ -93,11 +93,11 @@ def testThemeChanged(self):
9393

9494
# now kill layer 2
9595
project.removeMapLayer(layer2)
96-
self.assertEqual(len(theme_changed_spy), 5) # signal should not be emitted - layer is not in record
96+
self.assertEqual(len(theme_changed_spy), 5) # signal should not be emitted - layer is not in record
9797
# now kill layer 1
9898
project.removeMapLayer(layer)
9999
app.processEvents()
100-
self.assertEqual(len(theme_changed_spy), 6) # signal should be emitted - layer is in record
100+
self.assertEqual(len(theme_changed_spy), 6) # signal should be emitted - layer is in record
101101

102102
def testMasterLayerOrder(self):
103103
""" test master layer order"""

0 commit comments

Comments
 (0)