Skip to content

Commit 86b9592

Browse files
committed
[SPARK-37704] Update mypy version to 0.920
### What changes were proposed in this pull request? This PR updates mypy version in GitHub workflow to 0.920. Additionally, it fixes minor typing issue not detected by 0.910. ### Why are the changes needed? To keep annotations up to date with typing tools. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. Closes #34972 from zero323/SPARK-37704. Authored-by: zero323 <[email protected]> Signed-off-by: zero323 <[email protected]>
1 parent e2eaffe commit 86b9592

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/build_and_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ jobs:
477477
# See also https://github.com/sphinx-doc/sphinx/issues/7551.
478478
# Jinja2 3.0.0+ causes error when building with Sphinx.
479479
# See also https://issues.apache.org/jira/browse/SPARK-35375.
480-
python3.9 -m pip install 'flake8==3.9.0' pydata_sphinx_theme 'mypy==0.910' numpydoc 'jinja2<3.0.0' 'black==21.5b2'
480+
python3.9 -m pip install 'flake8==3.9.0' pydata_sphinx_theme 'mypy==0.920' numpydoc 'jinja2<3.0.0' 'black==21.5b2'
481481
# TODO Update to PyPI
482482
python3.9 -m pip install git+https://github.com/typeddjango/pytest-mypy-plugins.git@b0020061f48e85743ee3335bd62a3a608d17c6bd
483483
- name: Install R linter dependencies and SparkR

python/pyspark/pandas/indexing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def __getitem__(self, key: Any) -> Union["Series", "DataFrame"]:
553553

554554
psdf_or_psser: Union[DataFrame, Series]
555555
if returns_series:
556-
psdf_or_psser = first_series(psdf)
556+
psdf_or_psser = cast(Series, first_series(psdf))
557557
if series_name is not None and series_name != psdf_or_psser.name:
558558
psdf_or_psser = psdf_or_psser.rename(series_name)
559559
else:

0 commit comments

Comments
 (0)