From febd90f3bd2a0d6d123713003190084d767025a9 Mon Sep 17 00:00:00 2001 From: Paul Haesler Date: Wed, 24 Apr 2024 20:01:59 +1000 Subject: [PATCH] Added mypy check. Removed isort check. --- .github/workflows/lint.yml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f5a28b0c3..3a18e6679 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -51,7 +51,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.10 - run: python -m pip install flake8 - name: flake8 cleanup imported but unused uses: liskin/gh-problem-matcher-wrap@v3 @@ -60,19 +60,25 @@ jobs: run: | flake8 . --exclude Dockerfile --ignore=E501 --select=F401,E201,E202,E203,E502,E241,E225,E306,E231,E226,E123,F811 - isort: + mypy: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10"] + name: MyPy steps: - - name: Checkout + - name: checkout git uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 with: - python-version: 3.9 - - run: python -m pip install isort - - name: isort - uses: liskin/gh-problem-matcher-wrap@v3 + fetch-depth: 0 + - name: Setup conda + uses: s-weigand/setup-conda@v1 with: - linters: isort - run: | - isort --check --diff . + update-conda: true + python-version: ${{ matrix.python-version }} + conda-channels: anaconda, conda-forge + - name: run mypy + run: | + sudo apt-get remove python3-openssl + pip install --upgrade -e '.[types]' + mypy datacube_ows