Skip to content

Commit

Permalink
fix flake8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Mar 13, 2017
1 parent 55e7d93 commit 8bea742
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion python/plugins/MetaSearch/dialogs/maindialog.py
Expand Up @@ -34,7 +34,7 @@

import json
import os.path
from urllib.request import build_opener, HTTPError, install_opener, HTTPBasicAuthHandler, HTTPHandler, ProxyHandler
from urllib.request import build_opener, install_opener, ProxyHandler

from qgis.PyQt.QtCore import Qt
from qgis.PyQt.QtWidgets import QApplication, QDialog, QDialogButtonBox, QMessageBox, QTreeWidgetItem, QWidget
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/ProcessingPlugin.py
Expand Up @@ -40,7 +40,7 @@
from processing.core.Processing import Processing
from processing.gui.ProcessingToolbox import ProcessingToolbox
from processing.gui.HistoryDialog import HistoryDialog
from processing.gui.ConfigDialog import ConfigOptionsPage, ConfigDialog
from processing.gui.ConfigDialog import ConfigOptionsPage
from processing.gui.ResultsDock import ResultsDock
from processing.gui.CommanderWindow import CommanderWindow
from processing.modeler.ModelerDialog import ModelerDialog
Expand Down
Expand Up @@ -4,7 +4,7 @@
##To_keep=number 1
##Biggest parts=output vector

from qgis.core import Qgis, QgsGeometry, QgsWkbTypes
from qgis.core import QgsGeometry, QgsWkbTypes
from operator import itemgetter

To_keep = int(To_keep)
Expand Down
7 changes: 2 additions & 5 deletions python/plugins/processing/gui/ConfigDialog.py
Expand Up @@ -32,7 +32,6 @@
from qgis.PyQt import uic
from qgis.PyQt.QtCore import Qt, QEvent
from qgis.PyQt.QtWidgets import (QFileDialog,
QDialog,
QStyle,
QMessageBox,
QStyledItemDelegate,
Expand All @@ -41,12 +40,10 @@
QToolButton,
QHBoxLayout,
QComboBox,
QPushButton,
QApplication)
QPushButton)
from qgis.PyQt.QtGui import (QIcon,
QStandardItemModel,
QStandardItem,
QCursor)
QStandardItem)

from qgis.gui import (QgsDoubleSpinBox,
QgsSpinBox,
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsdelimitedtextprovider.py
Expand Up @@ -667,7 +667,7 @@ def deletefile(layer):
try:
os.remove(filename)
except:
file(filename, "w").close()
open(filename, "w").close()
assert os.path.getsize(filename) == 0, "removal and truncation of {} failed".format(filename)
# print "Deleted file - sleeping"
time.sleep(1)
Expand Down
6 changes: 3 additions & 3 deletions tests/src/python/test_qgsmapthemecollection.py
Expand Up @@ -65,7 +65,7 @@ def testThemeChanged(self):
self.assertEqual(len(themes_changed_spy), 3)
# remove valid
collection.removeMapTheme('theme1')
self.assertEqual(len(theme_changed_spy), 3) # not changed - removed!
self.assertEqual(len(theme_changed_spy), 3) # not changed - removed!
self.assertEqual(len(themes_changed_spy), 4)

# reinsert
Expand Down Expand Up @@ -93,11 +93,11 @@ def testThemeChanged(self):

# now kill layer 2
project.removeMapLayer(layer2)
self.assertEqual(len(theme_changed_spy), 5) # signal should not be emitted - layer is not in record
self.assertEqual(len(theme_changed_spy), 5) # signal should not be emitted - layer is not in record
# now kill layer 1
project.removeMapLayer(layer)
app.processEvents()
self.assertEqual(len(theme_changed_spy), 6) # signal should be emitted - layer is in record
self.assertEqual(len(theme_changed_spy), 6) # signal should be emitted - layer is in record

def testMasterLayerOrder(self):
""" test master layer order"""
Expand Down

0 comments on commit 8bea742

Please sign in to comment.