Skip to content

Commit f0b150e

Browse files
Typechecking (#89)
* Update dependencies * Fix typing errors * Add Pyright to code quality workflow * Fix typing issues * Remove useless definitions * Install all the dependencies
1 parent 5979fcb commit f0b150e

File tree

5 files changed

+679
-747
lines changed

5 files changed

+679
-747
lines changed

.github/workflows/code-quality.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,35 @@ jobs:
1919
- uses: actions/checkout@v4
2020
- uses: actions/setup-python@v5
2121
- uses: pre-commit/[email protected]
22+
23+
- name: Install poetry
24+
shell: bash
25+
run: |
26+
python -m pip install poetry
27+
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
28+
29+
- name: Configure poetry
30+
shell: bash
31+
run: poetry config virtualenvs.in-project true
32+
33+
- name: Set up cache
34+
uses: actions/cache@v3
35+
id: cache
36+
with:
37+
path: .venv
38+
key: venv-quality-${{ hashFiles('**/poetry.lock') }}
39+
40+
- name: Ensure cache is healthy
41+
if: steps.cache.outputs.cache-hit == 'true'
42+
shell: bash
43+
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
44+
45+
- name: Install dependencies
46+
shell: bash
47+
run: poetry install -E all
48+
49+
- uses: pre-commit/[email protected]
50+
51+
- name: Pyright
52+
shell: bash
53+
run: poetry run poe typecheck

0 commit comments

Comments
 (0)