Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-44833][CONNECT][PYTHON][FOLLOW-UP] Fix the type annotation for…
… iterator at reattach.py ### What changes were proposed in this pull request? This PR fixes the type hint of `self._iterator` at `reattach.py` to be `Optional` because `None` is assigned here. ### Why are the changes needed? To fix the CI: ``` starting mypy annotations test... annotations failed mypy checks: python/pyspark/sql/connect/client/reattach.py:149: error: Incompatible types in assignment (expression has type "None", variable has type "Iterator[ExecutePlanResponse]") [assignment] python/pyspark/sql/connect/client/reattach.py:254: error: Incompatible types in assignment (expression has type "None", variable has type "Iterator[ExecutePlanResponse]") [assignment] python/pyspark/sql/connect/client/reattach.py:[25](https://github.com/apache/spark/actions/runs/6093065151/job/16532169212#step:19:26)8: error: Incompatible types in assignment (expression has type "None", variable has type "Iterator[ExecutePlanResponse]") [assignment] Found 3 errors in 1 file (checked 703 source files) ``` ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Manually ran the script of `./dev/lint-python` ### Was this patch authored or co-authored using generative AI tooling? No Closes #42830 from HyukjinKwon/SPARK-44833-followup. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
- Loading branch information