File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
pandas/plotting/_matplotlib Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -1932,13 +1932,16 @@ def _make_plot(self, fig: Figure) -> None:
19321932 _stacked_subplots_ind : dict [int , int ] = {}
19331933 _stacked_subplots_offsets = []
19341934
1935- if self .subplots != False & self .stacked :
1936- sub_range = range (len (self .subplots )) # type:ignore[arg-type]
1935+ self .subplots : list [Any ]
1936+ if self .subplots :
1937+ subplots_flag = 1
1938+ else :
1939+ subplots_flag = 0
1940+
1941+ if subplots_flag & self .stacked :
1942+ sub_range = range (len (self .subplots ))
19371943 ss_temp = {
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+ x : self .subplots [x ] for x in sub_range if len (self .subplots [x ]) > 1
19421945 }
19431946 for k , v in ss_temp .items ():
19441947 for x in v :
You can’t perform that action at this time.
0 commit comments