Skip to content

Commit

Permalink
Fix E402
Browse files Browse the repository at this point in the history
  • Loading branch information
visr committed Nov 26, 2024
1 parent 5b1498e commit 2c50e24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
15 changes: 6 additions & 9 deletions ribasim_qgis/scripts/qgis_testrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
import sys
import traceback

# Monkey patch QGIS Python console
from console.console_output import writeOut

# Start as soon as the initializationCompleted signal is fired
from qgis.core import QgsApplication, QgsProject, QgsProjectBadLayerHandler
from qgis.PyQt.QtCore import QDir
from qgis.utils import iface

assert iface is not None
Expand Down Expand Up @@ -81,20 +87,11 @@ def __get_test_function(test_module_name):
return getattr(test_module, function_name, None)


# Start as soon as the initializationCompleted signal is fired
from qgis.core import QgsApplication, QgsProject, QgsProjectBadLayerHandler
from qgis.PyQt.QtCore import QDir


class QgsProjectBadLayerDefaultHandler(QgsProjectBadLayerHandler):
def handleBadLayers(self, layers, dom):
pass


# Monkey patch QGIS Python console
from console.console_output import writeOut


def _write(self, m):
sys.stdout.write(m)

Expand Down
1 change: 0 additions & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ target-version = "py39"
# See https://docs.astral.sh/ruff/rules/
select = ["C4", "D2", "D3", "D4", "E", "F", "I", "NPY", "PD", "UP"]
ignore = [
"E402",
"E501",
"E703",
"PD002",
Expand Down

0 comments on commit 2c50e24

Please sign in to comment.