From d098d49d1654d03d2de75dd108fbc590024326bd Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Mon, 28 Dec 2020 23:34:08 +0100 Subject: [PATCH 1/4] Run mypy also on the gui --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 43a8bbf..bbb427e 100644 --- a/Makefile +++ b/Makefile @@ -22,8 +22,8 @@ relational_gui/resources.py: pyrcc5 relational_gui/resources.qrc > relational_gui/resources.py .PHONY: mypy -mypy: - mypy relational relational_readline +mypy: gui + mypy relational relational_readline relational_gui .PHONY: test test: From c587c8923df85c425930bcf36f7f4fa642dac0c1 Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Mon, 28 Dec 2020 23:35:48 +0100 Subject: [PATCH 2/4] Depend on pyqt5 to run tests --- test-requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test-requirements.txt b/test-requirements.txt index 05aed54..6a64145 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,4 @@ mypy typedload +pyqt5 xtermcolor From a65d137e4ca1bdafb0e496f6bbb52141d27ec549 Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Mon, 28 Dec 2020 23:42:06 +0100 Subject: [PATCH 3/4] Figure out where the pyi files are --- .github/workflows/mypy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index ebb492f..4bbb196 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -13,5 +13,7 @@ jobs: python-version: '3.x' - name: Install dependencies run: pip install -r test-requirements.txt + - name: Workaround mypy issue + run: find / | grep pyi$ - name: mypy run: make mypy From 786ecd3ce10a86176b972512335be058137fbc3e Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Tue, 29 Dec 2020 00:06:11 +0100 Subject: [PATCH 4/4] Workaround the pyqt bug --- .github/workflows/mypy.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 4bbb196..68cf658 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -13,7 +13,9 @@ jobs: python-version: '3.x' - name: Install dependencies run: pip install -r test-requirements.txt - - name: Workaround mypy issue - run: find / | grep pyi$ + - name: Find py files + run: find / 2> /dev/null | grep pyi$ + - name: Workaround pyqt5 issue + run: sudo touch /opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/site-packages/PyQt5/typed.py - name: mypy run: make mypy