Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Python version for mypy check #15126

Merged
merged 6 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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