Bump Python version for mypy check (#15126)

This commit is contained in:
otaj 2022-10-13 16:46:40 +02:00 committed by GitHub
parent ee07de8136
commit 639bf77916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 12 deletions

View File

@ -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
@ -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

View File

@ -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",
]
@ -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",

View File

@ -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