ueshin opened a new pull request #34266: URL: https://github.com/apache/spark/pull/34266
### What changes were proposed in this pull request? Fix future typing errors in pyspark.pandas detected on mypy master. ### Why are the changes needed? The following problems are detected on master with mypy master. ``` pyspark/pandas/indexes/base.py:184: error: Incompatible types in assignment (expression has type "CategoricalIndex", variable has type "MultiIndex") [assignment] pyspark/pandas/indexes/base.py:188: error: Incompatible types in assignment (expression has type "Int64Index", variable has type "MultiIndex") [assignment] pyspark/pandas/indexes/base.py:192: error: Incompatible types in assignment (expression has type "Float64Index", variable has type "MultiIndex") [assignment] pyspark/pandas/indexes/base.py:197: error: Incompatible types in assignment (expression has type "DatetimeIndex", variable has type "MultiIndex") [assignment] pyspark/pandas/indexes/base.py:199: error: Incompatible types in assignment (expression has type "Index", variable has type "MultiIndex") [assignment] pyspark/pandas/indexes/base.py:201: error: "MultiIndex" has no attribute "_anchor" [attr-defined] ``` The complaints are legitimate now and we should fix them. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Manually checked with the latest mypy master https://github.com/python/mypy/commit/066da4d92af594d90420369f9af8cda2ca3b6c00. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
