Skip to content

Commit

Permalink
repo: Clean up mypy type installations
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cianmcgrath committed Apr 29, 2024
1 parent 8404e98 commit a054f55
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#!/bin/bash
python3 -m pip install .[dev]
mypy --install-types --non-interactive
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit a054f55

Please sign in to comment.