@@ -109,7 +109,7 @@ def _get_path_or_handle(
109
109
110
110
class BaseImpl :
111
111
@staticmethod
112
- def validate_dataframe (df : DataFrame ):
112
+ def validate_dataframe (df : DataFrame ) -> None :
113
113
114
114
if not isinstance (df , DataFrame ):
115
115
raise ValueError ("to_parquet only supports IO with DataFrames" )
@@ -139,7 +139,7 @@ def validate_dataframe(df: DataFrame):
139
139
def write (self , df : DataFrame , path , compression , ** kwargs ):
140
140
raise AbstractMethodError (self )
141
141
142
- def read (self , path , columns = None , ** kwargs ):
142
+ def read (self , path , columns = None , ** kwargs ) -> DataFrame :
143
143
raise AbstractMethodError (self )
144
144
145
145
@@ -164,7 +164,7 @@ def write(
164
164
storage_options : StorageOptions = None ,
165
165
partition_cols : list [str ] | None = None ,
166
166
** kwargs ,
167
- ):
167
+ ) -> None :
168
168
self .validate_dataframe (df )
169
169
170
170
from_pandas_kwargs : dict [str , Any ] = {"schema" : kwargs .pop ("schema" , None )}
@@ -206,7 +206,7 @@ def read(
206
206
use_nullable_dtypes = False ,
207
207
storage_options : StorageOptions = None ,
208
208
** kwargs ,
209
- ):
209
+ ) -> DataFrame :
210
210
kwargs ["use_pandas_metadata" ] = True
211
211
212
212
to_pandas_kwargs = {}
@@ -266,7 +266,7 @@ def write(
266
266
partition_cols = None ,
267
267
storage_options : StorageOptions = None ,
268
268
** kwargs ,
269
- ):
269
+ ) -> None :
270
270
self .validate_dataframe (df )
271
271
# thriftpy/protocol/compact.py:339:
272
272
# DeprecationWarning: tostring() is deprecated.
@@ -309,7 +309,7 @@ def write(
309
309
310
310
def read (
311
311
self , path , columns = None , storage_options : StorageOptions = None , ** kwargs
312
- ):
312
+ ) -> DataFrame :
313
313
parquet_kwargs : dict [str , Any ] = {}
314
314
use_nullable_dtypes = kwargs .pop ("use_nullable_dtypes" , False )
315
315
if Version (self .api .__version__ ) >= Version ("0.7.1" ):
@@ -442,7 +442,7 @@ def read_parquet(
442
442
storage_options : StorageOptions = None ,
443
443
use_nullable_dtypes : bool = False ,
444
444
** kwargs ,
445
- ):
445
+ ) -> DataFrame :
446
446
"""
447
447
Load a parquet object from the file path, returning a DataFrame.
448
448
0 commit comments