From 6798549e4c4fed4de40d74ef3718feefc0eea387 Mon Sep 17 00:00:00 2001 From: Akihiro Nitta Date: Tue, 12 Jul 2022 06:46:52 +0900 Subject: [PATCH] CI: Update mypy workflow (#13574) * Fix pyproject.toml * Add TODO * Update mypy workflow --- .github/workflows/code-checks.yml | 11 +++++------ pyproject.toml | 8 +++++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index c1c8ffd700..fc02f34004 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -13,10 +13,10 @@ concurrency: jobs: mypy: runs-on: ubuntu-20.04 - # todo: checking also lightning_app steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v3 with: 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 list - - name: Type check PyTorch - working-directory: src - run: mypy pytorch_lightning --install-types --non-interactive --config-file ../pyproject.toml + - name: Check typing + run: mypy diff --git a/pyproject.toml b/pyproject.toml index f5b78cafe2..770f0983c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,13 @@ line-length = 120 [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" ignore_missing_imports = "True" show_error_codes = "True"