Skip to content

Commit 7e4abbf

Browse files
otajnicolai86
authored andcommitted
Bump Python version for mypy check (#15126)
1 parent 3aec3af commit 7e4abbf

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

.github/workflows/code-checks.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- uses: actions/setup-python@v4
2020
with:
21-
python-version: 3.9
21+
python-version: '3.10.6'
2222

2323
# Note: This uses an internal pip API and may not always work
2424
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
@@ -35,8 +35,10 @@ jobs:
3535
pip install torch==1.12 --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
3636
python ./requirements/pytorch/adjust-versions.py requirements/pytorch/extra.txt
3737
# todo: adjust requirements for both code-bases
38-
pip install -r requirements/pytorch/devel.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
38+
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
3939
pip list
4040
4141
- name: Check typing
42-
run: mypy
42+
run: |
43+
mkdir .mypy_cache
44+
mypy

pyproject.toml

+3-7
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ exclude = '(_notebooks/.*)'
2828
files = [
2929
"src/pytorch_lightning",
3030
"src/lightning_lite",
31-
"src/lightning_app/",
31+
"src/lightning_app",
3232
]
3333
exclude = [
34-
"src/lightning_app/cli/component-template/",
35-
"src/lightning_app/cli/pl-app-template/",
34+
"src/lightning_app/cli/component-template",
35+
"src/lightning_app/cli/pl-app-template",
3636
"src/lightning_app/cli/react-ui-template",
3737
"src/lightning_app/cli/app-template",
3838
]
@@ -58,10 +58,6 @@ warn_no_return = "False"
5858
module = [
5959
"lightning_app.api.http_methods",
6060
"lightning_app.api.request_types",
61-
"lightning_app.cli.app-template.app",
62-
"lightning_app.cli.app-template.placeholdername.components.component_a.component_a",
63-
"lightning_app.cli.app-template.placeholdername.components.component_b.component_a",
64-
"lightning_app.cli.app-template.tests.test_placeholdername_app",
6561
"lightning_app.cli.commands.app_commands",
6662
"lightning_app.cli.commands.connection",
6763
"lightning_app.cli.react-ui-template.example_app",

src/pytorch_lightning/trainer/connectors/callback_connector.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,9 @@ def _configure_external_callbacks() -> List[Callback]:
271271
from importlib.metadata import entry_points
272272

273273
if _PYTHON_GREATER_EQUAL_3_10_0:
274-
factories = entry_points(group=group) # type: ignore[call-arg]
274+
factories = entry_points(group=group)
275275
else:
276-
factories = entry_points().get(group, {}) # type: ignore[assignment]
276+
factories = entry_points().get(group, {}) # type: ignore[arg-type]
277277
else:
278278
from pkg_resources import iter_entry_points
279279

0 commit comments

Comments
 (0)