Skip to content

Commit

Permalink
Bump Python version for mypy check (#15126)
Browse files Browse the repository at this point in the history
  • Loading branch information
otaj authored Oct 13, 2022
1 parent ee07de8 commit 639bf77
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: '3.10.6'

# Note: This uses an internal pip API and may not always work
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
Expand All @@ -35,8 +35,10 @@ jobs:
pip install torch==1.12 --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
python ./requirements/pytorch/adjust-versions.py requirements/pytorch/extra.txt
# todo: adjust requirements for both code-bases
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 -r requirements/app/devel.txt -r requirements/lite/devel.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip list
- name: Check typing
run: mypy
run: |
mkdir .mypy_cache
mypy
10 changes: 3 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ exclude = '(_notebooks/.*)'
files = [
"src/pytorch_lightning",
"src/lightning_lite",
"src/lightning_app/",
"src/lightning_app",
]
exclude = [
"src/lightning_app/cli/component-template/",
"src/lightning_app/cli/pl-app-template/",
"src/lightning_app/cli/component-template",
"src/lightning_app/cli/pl-app-template",
"src/lightning_app/cli/react-ui-template",
"src/lightning_app/cli/app-template",
]
Expand All @@ -58,10 +58,6 @@ warn_no_return = "False"
module = [
"lightning_app.api.http_methods",
"lightning_app.api.request_types",
"lightning_app.cli.app-template.app",
"lightning_app.cli.app-template.placeholdername.components.component_a.component_a",
"lightning_app.cli.app-template.placeholdername.components.component_b.component_a",
"lightning_app.cli.app-template.tests.test_placeholdername_app",
"lightning_app.cli.commands.app_commands",
"lightning_app.cli.commands.connection",
"lightning_app.cli.react-ui-template.example_app",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ def _configure_external_callbacks() -> List[Callback]:
from importlib.metadata import entry_points

if _PYTHON_GREATER_EQUAL_3_10_0:
factories = entry_points(group=group) # type: ignore[call-arg]
factories = entry_points(group=group)
else:
factories = entry_points().get(group, {}) # type: ignore[assignment]
factories = entry_points().get(group, {}) # type: ignore[arg-type]
else:
from pkg_resources import iter_entry_points

Expand Down

0 comments on commit 639bf77

Please sign in to comment.