File tree 3 files changed +8
-5
lines changed
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -340,7 +340,10 @@ def _get_or_calc_series(
340
340
return name , array
341
341
342
342
def _fulfill_series (self , column_name : str ) -> ndarray :
343
- column_info = self ._stock_columns_info_map .get (column_name )
343
+ # Since `column_name` always exists logically,
344
+ # we could safely get by dict[key]
345
+ column_info = self ._stock_columns_info_map [column_name ]
346
+
344
347
size = len (self )
345
348
346
349
array = self .get_column (column_name ).to_numpy ()
Original file line number Diff line number Diff line change @@ -92,8 +92,8 @@ def cum_append(
92
92
name = other [0 ].name
93
93
other = DataFrame (other )
94
94
95
- if (df .columns .get_indexer (other .columns ) >= 0 ).all ():
96
- other = other .reindex (columns = df .columns )
95
+ if (df .columns .get_indexer (other .columns ) >= 0 ).all (): # type: ignore
96
+ other = other .reindex (columns = df .columns ) # type: ignore
97
97
98
98
length = len (df [name :]) if len (df ) else 0
99
99
if length :
@@ -129,7 +129,7 @@ def update(
129
129
self ,
130
130
df : 'MetaDataFrame' ,
131
131
source ,
132
- source_cumulator : '_Cumulator' = None ,
132
+ source_cumulator : Optional [ '_Cumulator' ] = None ,
133
133
date_col : Optional [str ] = None ,
134
134
to_datetime_kwargs : dict = {},
135
135
time_frame : TimeFrameArg = None ,
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ def test_invalid_slicing(stock: StockDataFrame):
97
97
# However, it might never happen,
98
98
# but there is a assertion in super()._slice
99
99
# we have to test about this case
100
- stock ._slice ({})
100
+ stock ._slice ({}) # type: ignore
101
101
102
102
assert stock ._stock_indexer_slice is None
103
103
You can’t perform that action at this time.
0 commit comments