Skip to content

Commit eadc564

Browse files
committed
Added mypy type checking as a cicd pipe I noticed some type errors.
There are some errors but should be relatively easy to fix!
1 parent ebfee85 commit eadc564

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/python.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@ jobs:
2424
cd ./backend
2525
python -m pip install --upgrade pip
2626
pip install ruff
27-
28-
# Update output format to enable automatic inline annotations.
27+
pip install mypy
2928
- name: Check style with Ruff
3029
run: |
3130
cd ./backend
3231
ruff check --output-format=github .
32+
- name: Check type hints with mypy
33+
run: |
34+
cd ./backend
35+
pip install .
36+
mypy --show-error-codes beets_flask
3337
- name: Test with pytest
3438
run: |
3539
cd ./backend

backend/pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,8 @@ pythonpath = ["."]
8383

8484
[tool.coverage.report]
8585
omit = ["*/tests/*"]
86+
87+
88+
[tool.mypy]
89+
ignore_missing_imports = true
90+
check_untyped_defs = true

0 commit comments

Comments
 (0)