@@ -109,7 +109,7 @@ def _get_path_or_handle(
109109
110110class BaseImpl :
111111 @staticmethod
112- def validate_dataframe (df : DataFrame ):
112+ def validate_dataframe (df : DataFrame ) -> None :
113113
114114 if not isinstance (df , DataFrame ):
115115 raise ValueError ("to_parquet only supports IO with DataFrames" )
@@ -139,7 +139,7 @@ def validate_dataframe(df: DataFrame):
139139 def write (self , df : DataFrame , path , compression , ** kwargs ):
140140 raise AbstractMethodError (self )
141141
142- def read (self , path , columns = None , ** kwargs ):
142+ def read (self , path , columns = None , ** kwargs ) -> DataFrame :
143143 raise AbstractMethodError (self )
144144
145145
@@ -164,7 +164,7 @@ def write(
164164 storage_options : StorageOptions = None ,
165165 partition_cols : list [str ] | None = None ,
166166 ** kwargs ,
167- ):
167+ ) -> None :
168168 self .validate_dataframe (df )
169169
170170 from_pandas_kwargs : dict [str , Any ] = {"schema" : kwargs .pop ("schema" , None )}
@@ -206,7 +206,7 @@ def read(
206206 use_nullable_dtypes = False ,
207207 storage_options : StorageOptions = None ,
208208 ** kwargs ,
209- ):
209+ ) -> DataFrame :
210210 kwargs ["use_pandas_metadata" ] = True
211211
212212 to_pandas_kwargs = {}
@@ -266,7 +266,7 @@ def write(
266266 partition_cols = None ,
267267 storage_options : StorageOptions = None ,
268268 ** kwargs ,
269- ):
269+ ) -> None :
270270 self .validate_dataframe (df )
271271 # thriftpy/protocol/compact.py:339:
272272 # DeprecationWarning: tostring() is deprecated.
@@ -309,7 +309,7 @@ def write(
309309
310310 def read (
311311 self , path , columns = None , storage_options : StorageOptions = None , ** kwargs
312- ):
312+ ) -> DataFrame :
313313 parquet_kwargs : dict [str , Any ] = {}
314314 use_nullable_dtypes = kwargs .pop ("use_nullable_dtypes" , False )
315315 if Version (self .api .__version__ ) >= Version ("0.7.1" ):
@@ -442,7 +442,7 @@ def read_parquet(
442442 storage_options : StorageOptions = None ,
443443 use_nullable_dtypes : bool = False ,
444444 ** kwargs ,
445- ):
445+ ) -> DataFrame :
446446 """
447447 Load a parquet object from the file path, returning a DataFrame.
448448
0 commit comments