Commit 0144818
[SPARK-36985][PYTHON] Fix future typing errors in pyspark.pandas
### What changes were proposed in this pull request?
Fix future typing errors in pyspark.pandas detected with 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 python/mypy@066da4d.
Closes #34266 from ueshin/issues/SPARK-36985/mypy0.920.
Authored-by: Takuya UESHIN <ueshin@databricks.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>1 parent 973f04e commit 0144818
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| |||
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
201 | | - | |
| 202 | + | |
202 | 203 | | |
203 | 204 | | |
204 | 205 | | |
| |||
0 commit comments