@@ -137,7 +137,7 @@ def _ensure_decoded(s):
137
137
return s
138
138
139
139
140
- def _ensure_encoding (encoding ) :
140
+ def _ensure_encoding (encoding : str | None ) -> str :
141
141
# set the encoding if we need
142
142
if encoding is None :
143
143
encoding = _default_encoding
@@ -543,8 +543,6 @@ class HDFStore:
543
543
544
544
_handle : File | None
545
545
_mode : str
546
- _complevel : int
547
- _fletcher32 : bool
548
546
549
547
def __init__ (
550
548
self ,
@@ -1043,7 +1041,7 @@ def select_as_multiple(
1043
1041
_tbls = [x for x in tbls if isinstance (x , Table )]
1044
1042
1045
1043
# axis is the concentration axes
1046
- axis = list ( {t .non_index_axes [0 ][0 ] for t in _tbls })[ 0 ]
1044
+ axis = {t .non_index_axes [0 ][0 ] for t in _tbls }. pop ()
1047
1045
1048
1046
def func (_start , _stop , _where ):
1049
1047
@@ -1975,9 +1973,6 @@ class IndexCol:
1975
1973
is_data_indexable : bool = True
1976
1974
_info_fields = ["freq" , "tz" , "index_name" ]
1977
1975
1978
- name : str
1979
- cname : str
1980
-
1981
1976
def __init__ (
1982
1977
self ,
1983
1978
name : str ,
@@ -2310,7 +2305,7 @@ def __init__(
2310
2305
values = None ,
2311
2306
kind = None ,
2312
2307
typ = None ,
2313
- cname = None ,
2308
+ cname : str | None = None ,
2314
2309
pos = None ,
2315
2310
tz = None ,
2316
2311
ordered = None ,
@@ -2622,17 +2617,14 @@ class Fixed:
2622
2617
format_type : str = "fixed" # GH#30962 needed by dask
2623
2618
obj_type : type [DataFrame | Series ]
2624
2619
ndim : int
2625
- encoding : str
2626
2620
parent : HDFStore
2627
- group : Node
2628
- errors : str
2629
2621
is_table : bool = False
2630
2622
2631
2623
def __init__ (
2632
2624
self ,
2633
2625
parent : HDFStore ,
2634
2626
group : Node ,
2635
- encoding : str = "UTF-8" ,
2627
+ encoding : str | None = "UTF-8" ,
2636
2628
errors : str = "strict" ,
2637
2629
) -> None :
2638
2630
assert isinstance (parent , HDFStore ), type (parent )
@@ -3306,24 +3298,19 @@ class Table(Fixed):
3306
3298
levels : int | list [Hashable ] = 1
3307
3299
is_table = True
3308
3300
3309
- index_axes : list [IndexCol ]
3310
- non_index_axes : list [tuple [int , Any ]]
3311
- values_axes : list [DataCol ]
3312
- data_columns : list
3313
3301
metadata : list
3314
- info : dict
3315
3302
3316
3303
def __init__ (
3317
3304
self ,
3318
3305
parent : HDFStore ,
3319
3306
group : Node ,
3320
- encoding = None ,
3307
+ encoding : str | None = None ,
3321
3308
errors : str = "strict" ,
3322
- index_axes = None ,
3323
- non_index_axes = None ,
3324
- values_axes = None ,
3325
- data_columns = None ,
3326
- info = None ,
3309
+ index_axes : list [ IndexCol ] | None = None ,
3310
+ non_index_axes : list [ tuple [ AxisInt , Any ]] | None = None ,
3311
+ values_axes : list [ DataCol ] | None = None ,
3312
+ data_columns : list | None = None ,
3313
+ info : dict | None = None ,
3327
3314
nan_rep = None ,
3328
3315
) -> None :
3329
3316
super ().__init__ (parent , group , encoding = encoding , errors = errors )
0 commit comments