Skip to content

Commit 2561f30

Browse files
committed
Upgrade python version for validate_python to 3.13
1 parent 2cc75d3 commit 2561f30

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.github/workflows/validate_python.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup python3
1616
uses: actions/setup-python@v5
1717
with:
18-
python-version: '3.8.x'
18+
python-version: '3.13.x'
1919

2020
- name: Install build dependencies
2121
run: python -m pip install -r python_build_requirements.txt
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install poetry for validate_examples.py
2828
uses: abatilo/actions-poetry@v3
2929
with:
30-
poetry-version: 1.2.2
30+
poetry-version: latest
3131

3232
- name: Validate examples (except aio)
3333
run: |

python_build_requirements.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ MarkupSafe==2.0.1
44
schema==0.7.4
55
black==23.3.0
66
mypy>=0.910
7-
ni-python-styleguide~=0.1
8-
pycodestyle==2.7.0
9-
importlib-metadata==4.12.0
7+
ni-python-styleguide~=0.4
8+
pycodestyle==2.11.1
9+
importlib-metadata==8.6.1

source/codegen/stage_client_files.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from pathlib import Path
55
from shutil import copy2, copytree
66
from tempfile import TemporaryDirectory
7-
from typing import Dict, Iterable, List
7+
from typing import Iterable, List
88

99
from common_helpers import get_driver_readiness, is_driver_restricted
1010
from template_helpers import load_metadata

source/codegen/validate_examples.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def _validate_examples(
6363
_system("poetry add grpcio")
6464
_system("poetry add --dev grpcio-tools mypy mypy-protobuf types-protobuf grpc-stubs")
6565
_system("poetry add --dev black==23.3.0")
66-
_system("poetry install")
66+
_system("poetry install --no-root")
6767

6868
_stage_client_files(artifact_location, staging_dir)
6969
examples_dir = staging_dir / "examples"
@@ -90,7 +90,7 @@ def _validate_examples(
9090

9191
print(f" -> Running mypy")
9292
_system(
93-
f"poetry run mypy {dir} --check-untyped-defs --ignore-missing-imports{exclude_option}"
93+
f"poetry run mypy {dir} --check-untyped-defs --disable-error-code=operator --ignore-missing-imports{exclude_option}"
9494
)
9595

9696
if ip_address:

0 commit comments

Comments
 (0)