@@ -1401,7 +1401,7 @@ def _check_if_open(self):
1401
1401
if not self .is_open :
1402
1402
raise ClosedFileError ("{0} file is not open!" .format (self ._path ))
1403
1403
1404
- def _validate_format (self , format , kwargs ) :
1404
+ def _validate_format (self , format : str , kwargs : Dict [ str , Any ]) -> Dict [ str , Any ] :
1405
1405
""" validate / deprecate formats; return the new kwargs """
1406
1406
kwargs = kwargs .copy ()
1407
1407
@@ -1594,10 +1594,9 @@ class TableIterator:
1594
1594
stop : the passed stop value (default is None)
1595
1595
iterator : bool, default False
1596
1596
Whether to use the default iterator.
1597
- chunksize : the passed chunking value (default is 50000 )
1597
+ chunksize : the passed chunking value (default is 100000 )
1598
1598
auto_close : boolean, automatically close the store at the end of
1599
1599
iteration, default is False
1600
- kwargs : the passed kwargs
1601
1600
"""
1602
1601
1603
1602
chunksize : Optional [int ]
@@ -1613,7 +1612,7 @@ def __init__(
1613
1612
start = None ,
1614
1613
stop = None ,
1615
1614
iterator : bool = False ,
1616
- chunksize = None ,
1615
+ chunksize : Optional [ int ] = None ,
1617
1616
auto_close : bool = False ,
1618
1617
):
1619
1618
self .store = store
@@ -3399,15 +3398,14 @@ def _get_metadata_path(self, key) -> str:
3399
3398
""" return the metadata pathname for this key """
3400
3399
return "{group}/meta/{key}/meta" .format (group = self .group ._v_pathname , key = key )
3401
3400
3402
- def write_metadata (self , key , values ):
3401
+ def write_metadata (self , key : str , values ):
3403
3402
"""
3404
3403
write out a meta data array to the key as a fixed-format Series
3405
3404
3406
3405
Parameters
3407
3406
----------
3408
- key : string
3407
+ key : str
3409
3408
values : ndarray
3410
-
3411
3409
"""
3412
3410
values = Series (values )
3413
3411
self .parent .put (
@@ -3419,7 +3417,7 @@ def write_metadata(self, key, values):
3419
3417
nan_rep = self .nan_rep ,
3420
3418
)
3421
3419
3422
- def read_metadata (self , key ):
3420
+ def read_metadata (self , key : str ):
3423
3421
""" return the meta data array for this key """
3424
3422
if getattr (getattr (self .group , "meta" , None ), key , None ) is not None :
3425
3423
return self .parent .select (self ._get_metadata_path (key ))
@@ -3966,7 +3964,11 @@ def process_filter(field, filt):
3966
3964
return obj
3967
3965
3968
3966
def create_description (
3969
- self , complib = None , complevel = None , fletcher32 : bool = False , expectedrows = None
3967
+ self ,
3968
+ complib = None ,
3969
+ complevel = None ,
3970
+ fletcher32 : bool = False ,
3971
+ expectedrows : Optional [int ] = None ,
3970
3972
):
3971
3973
""" create the description of the table from the axes & values """
3972
3974
@@ -4150,7 +4152,7 @@ def write(
4150
4152
# add the rows
4151
4153
self .write_data (chunksize , dropna = dropna )
4152
4154
4153
- def write_data (self , chunksize , dropna = False ):
4155
+ def write_data (self , chunksize : Optional [ int ] , dropna : bool = False ):
4154
4156
""" we form the data into a 2-d including indexes,values,mask
4155
4157
write chunk-by-chunk """
4156
4158
@@ -4478,7 +4480,7 @@ class GenericTable(AppendableFrameTable):
4478
4480
obj_type = DataFrame
4479
4481
4480
4482
@property
4481
- def pandas_type (self ):
4483
+ def pandas_type (self ) -> str :
4482
4484
return self .pandas_kind
4483
4485
4484
4486
@property
@@ -4530,7 +4532,7 @@ class AppendableMultiFrameTable(AppendableFrameTable):
4530
4532
_re_levels = re .compile (r"^level_\d+$" )
4531
4533
4532
4534
@property
4533
- def table_type_short (self ):
4535
+ def table_type_short (self ) -> str :
4534
4536
return "appendable_multi"
4535
4537
4536
4538
def write (self , obj , data_columns = None , ** kwargs ):
0 commit comments