CI: Update mypy workflow (#13574)
* Fix pyproject.toml * Add TODO * Update mypy workflow
This commit is contained in:
parent
9347d67b4e
commit
6798549e4c
|
@ -13,10 +13,10 @@ concurrency:
|
||||||
jobs:
|
jobs:
|
||||||
mypy:
|
mypy:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
# todo: checking also lightning_app
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v2
|
|
||||||
|
- uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
|
|
||||||
|
@ -37,6 +37,5 @@ jobs:
|
||||||
pip install -r requirements/pytorch/devel.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
|
pip install -r requirements/pytorch/devel.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
|
||||||
pip list
|
pip list
|
||||||
|
|
||||||
- name: Type check PyTorch
|
- name: Check typing
|
||||||
working-directory: src
|
run: mypy
|
||||||
run: mypy pytorch_lightning --install-types --non-interactive --config-file ../pyproject.toml
|
|
||||||
|
|
|
@ -22,7 +22,13 @@ line-length = 120
|
||||||
|
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
files = ["pytorch_lightning"]
|
files = [
|
||||||
|
"src/pytorch_lightning",
|
||||||
|
# TODO: Check typing in app source
|
||||||
|
# "src/lightning_app",
|
||||||
|
]
|
||||||
|
install_types = "True"
|
||||||
|
non_interactive = "True"
|
||||||
disallow_untyped_defs = "True"
|
disallow_untyped_defs = "True"
|
||||||
ignore_missing_imports = "True"
|
ignore_missing_imports = "True"
|
||||||
show_error_codes = "True"
|
show_error_codes = "True"
|
||||||
|
|
Loading…
Reference in New Issue