File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
pandas/plotting/_matplotlib Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -1929,18 +1929,16 @@ def _make_plot(self, fig: Figure) -> None:
1929
1929
1930
1930
data = self .data .fillna (0 )
1931
1931
1932
- _stacked_subplots_ind = {}
1932
+ _stacked_subplots_ind : dict [ int , int ] = {}
1933
1933
_stacked_subplots_offsets = []
1934
1934
1935
- if self .subplots :
1936
- subplots_status = 1
1937
- else :
1938
- subplots_status = 0
1939
-
1940
- if subplots_status & self .stacked :
1941
- sub_range = range (len (self .subplots ))
1935
+ if self .subplots != False & self .stacked :
1936
+ sub_range = range (len (self .subplots )) # type:ignore[arg-type]
1942
1937
ss_temp = {
1943
- x : self .subplots [x ] for x in sub_range if len (self .subplots [x ]) > 1
1938
+ # mypy thinks self.subplots is a bool :(
1939
+ x : self .subplots [x ] # type:ignore[index]
1940
+ for x in sub_range
1941
+ if len (self .subplots [x ]) > 1 # type:ignore[index]
1944
1942
}
1945
1943
for k , v in ss_temp .items ():
1946
1944
for x in v :
@@ -1976,7 +1974,7 @@ def _make_plot(self, fig: Figure) -> None:
1976
1974
1977
1975
if i in _stacked_subplots_ind :
1978
1976
offset_index = _stacked_subplots_ind [i ]
1979
- pos_prior , neg_prior = _stacked_subplots_offsets [offset_index ]
1977
+ pos_prior , neg_prior = _stacked_subplots_offsets [offset_index ] # type:ignore[assignment]
1980
1978
mask = y >= 0
1981
1979
start = np .where (mask , pos_prior , neg_prior ) + self ._start_base
1982
1980
w = self .bar_width / 2
You can’t perform that action at this time.
0 commit comments