Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix development tools #1670

Merged
merged 4 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"julia.lint.disabledDirs": [
".pixi"
],
"julia.lint.run": true
"julia.lint.run": true,
"files.insertFinalNewline": true
}
1 change: 1 addition & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ extra_checks = True
disallow_subclassing_any = True
disallow_untyped_decorators = True
disallow_any_generics = True
mypy_path = .pixi/envs/$PIXI_ENVIRONMENT_NAME/Library/python,.pixi/envs/$PIXI_ENVIRONMENT_NAME/share/qgis/python

# Ignore errors for imported packages.
[mypy-console.*]
Expand Down
1 change: 1 addition & 0 deletions open-vscode.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pixi run --environment=dev code . | exit
2 changes: 1 addition & 1 deletion ribasim_qgis/ribasim_qgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from qgis.PyQt.QtWidgets import QAction


class RibasimDockWidget(QgsDockWidget): # type: ignore
class RibasimDockWidget(QgsDockWidget):

Check warning on line 11 in ribasim_qgis/ribasim_qgis.py

View check run for this annotation

Codecov / codecov/patch

ribasim_qgis/ribasim_qgis.py#L11

Added line #L11 was not covered by tests
def closeEvent(self, event) -> None:
# TODO: if we implement talking to a Julia server, shut it down here.
event.accept()
Expand Down
2 changes: 1 addition & 1 deletion ribasim_qgis/scripts/qgis_testrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __get_test_function(test_module_name):
from qgis.PyQt.QtCore import QDir


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

Expand Down
2 changes: 1 addition & 1 deletion ribasim_qgis/tests/core/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
)


class TestModel(unittest.TestCase): # type: ignore
class TestModel(unittest.TestCase):
tests_folder_path = Path(__file__).parent.parent.resolve()
data_folder_path = tests_folder_path / "data"

Expand Down
2 changes: 1 addition & 1 deletion ribasim_qgis/ui_tests/test_load_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from qgis.utils import iface, plugins


class TestPlugin(unittest.TestCase): # type: ignore
class TestPlugin(unittest.TestCase):
def test_plugin_is_loaded(self):
"""Test plugin is properly loaded and appears in QGIS plugins."""
plugin = plugins.get("ribasim_qgis")
Expand Down