Skip to content

Commit

Permalink
ci: check with mypy (#195)
Browse files Browse the repository at this point in the history
* ci: check with mypy

* fix: install stubs

* fix: install stubs without mypy --install-types
  • Loading branch information
himkt authored Jan 13, 2024
1 parent 112233c commit 94b50ee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ jobs:
- run: python -m pip install --upgrade pip
- run: pip install .[all]
- run: pip install ruff pytest httpx
- run: pip install ruff pytest httpx mypy types-requests

- run: |
ruff check src
ruff format --diff src
- run: |
mypy src
- run: pytest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,15 @@ mypy = "^1.8.0"
[build-system]
requires = ["poetry>=1.0.2"]
build-backend = "poetry.masonry.api"

[[tool.mypy.overrides]]
module = [
"boto3",
"janome.tokenizer",
"nagisa",
"natto",
"Mykytea",
"sentencepiece",
"sudachipy",
]
ignore_missing_imports = true

0 comments on commit 94b50ee

Please sign in to comment.