zero323 commented on a change in pull request #34227:
URL: https://github.com/apache/spark/pull/34227#discussion_r726574531
##########
File path: python/pyspark/pandas/namespace.py
##########
@@ -1378,11 +1383,11 @@ def read_sql_table(
reader.options(**options)
sdf = reader.format("jdbc").load()
index_spark_columns, index_names = _get_index_map(sdf, index_col)
- psdf = DataFrame(
+ psdf: DataFrame = DataFrame(
Review comment:
I haven't, but it seems like it is caused by `@no_type_check` on
initializer:
https://github.com/apache/spark/blob/20051eb69904de6afc27fe5adb18bcc760c78701/python/pyspark/pandas/frame.py#L440
```python
# test.py
from typing import no_type_check
class Foo:
@no_type_check
def __init__(self):
pass
reveal_type(Foo())
```
```
$ mypy test.py
test.py:9: note: Revealed type is "Any"
```
--
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]