From a054f55478b88c8337923c9ca3e3663af5cdbdbe Mon Sep 17 00:00:00 2001 From: Cian McGrath Date: Fri, 26 Apr 2024 13:46:31 +0100 Subject: [PATCH] repo: Clean up mypy type installations If mypy has not been run before, --install-types will sometimes hit error: --install-types failed (no mypy cache directory) As we're now installing all of the dependencies by hand that we need and we've addressed the issue with the type-protobuf, we no longer need these and they just add additional overhead as they cause mypy to be run twice always Also upgrade mypy to 0.981 to include a fix for a numpy issue Change-Id: Icb8c20f6f196f12e75e9f02f179a5d3ee3a34748 --- Makefile | 4 ++-- install.sh | 1 - requirements-dev.txt | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 83c9a1f5..181766f7 100644 --- a/Makefile +++ b/Makefile @@ -20,9 +20,9 @@ dist: python3 -m build dev-setup: - pip3 install -r requirements-dev.txt + pip3 install .[dev] lint: flake8 . - mypy --install-types --non-interactive --exclude build --exclude .venv . + mypy --exclude build --exclude .venv . ./check_copyright.sh diff --git a/install.sh b/install.sh index b649c088..0491a6b5 100755 --- a/install.sh +++ b/install.sh @@ -1,3 +1,2 @@ #!/bin/bash python3 -m pip install .[dev] -mypy --install-types --non-interactive diff --git a/requirements-dev.txt b/requirements-dev.txt index 6f51f600..1e797350 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ isort==5.11.4 black==24.3.0 mypy-protobuf==3.2.0 -mypy==0.950 +mypy==0.981 pytest==7.1.2 numpy==1.26.4 pyyaml==6.0.1