Skip to content

Commit

Permalink
tweaks for online mypy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jornbr committed Dec 9, 2024
1 parent 36261f4 commit fced647
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/fabm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,16 +297,17 @@ jobs:
python -c "import pyfabm;print('pyfabm version =', getattr(pyfabm, '__version__', None))"
for f in testcases/*.yaml; do fabm_describe_model $f; done
for f in testcases/*.yaml; do fabm_complete_yaml --add_missing $f; done
- name: Type checking with mypy
run: |
conda install mypy
mypy src/pyfabm
- name: Run notebooks
if: matrix.python-version != '3.7' # due to https://github.com/conda-forge/webcolors-feedstock/issues/26
run: |
conda install ipython jupyterlab ipympl matplotlib scipy
cd testcases/python
for f in *.ipynb; do ipython --gui qt -c "%run $f"; done
- name: Type checking with mypy
if: matrix.python-version != '3.7'
run: |
conda install mypy pyyaml
mypy src/pyfabm
- name: Install with customization via command line arguments
run: |
rm -rf build
Expand Down
4 changes: 2 additions & 2 deletions src/pyfabm/gui_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import pyfabm

try:
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5 import QtCore, QtGui, QtWidgets # type: ignore
except ImportError as e1:
try:
from PySide import QtCore, QtGui
from PySide import QtCore, QtGui # type: ignore

QtWidgets = QtGui
except ImportError as e2:
Expand Down
2 changes: 1 addition & 1 deletion src/pyfabm/utils/fabm_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import os

import numpy
import netCDF4
import netCDF4 # type: ignore
import yaml

try:
Expand Down

0 comments on commit fced647

Please sign in to comment.