Skip to content

Commit 9974632

Browse files
committed
Docstring adjustment
1 parent 4cc2905 commit 9974632

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

pandas/plotting/_matplotlib/core.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1929,18 +1929,17 @@ def _make_plot(self, fig: Figure) -> None:
19291929

19301930
data = self.data.fillna(0)
19311931

1932-
_stacked_subplots_ind_dict = {}
1932+
_stacked_subplots_ind = {}
19331933
_stacked_subplots_offsets = []
19341934

19351935
if self.subplots != False & self.stacked:
1936-
temp_ss_dict = {
1937-
x: self.subplots[x]
1938-
for x in range(len(self.subplots))
1939-
if len(self.subplots[x]) > 1
1936+
sub_range = range(len(self.subplots))
1937+
ss_temp = {
1938+
x: self.subplots[x] for x in sub_range if len(self.subplots[x]) > 1
19401939
}
1941-
for k, v in temp_ss_dict.items():
1940+
for k, v in ss_temp.items():
19421941
for x in v:
1943-
_stacked_subplots_ind_dict.setdefault(int(x), k)
1942+
_stacked_subplots_ind.setdefault(int(x), k)
19441943

19451944
_stacked_subplots_offsets.append([0, 0])
19461945

@@ -1970,8 +1969,8 @@ def _make_plot(self, fig: Figure) -> None:
19701969

19711970
kwds["align"] = self._align
19721971

1973-
if i in _stacked_subplots_ind_dict:
1974-
offset_index = _stacked_subplots_ind_dict[i]
1972+
if i in _stacked_subplots_ind:
1973+
offset_index = _stacked_subplots_ind[i]
19751974
pos_prior, neg_prior = _stacked_subplots_offsets[offset_index]
19761975
mask = y >= 0
19771976
start = np.where(mask, pos_prior, neg_prior) + self._start_base

pandas/tests/plotting/test_misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def test_bar_plt_xaxis_intervalrange(self):
684684

685685

686686
@pytest.fixture(scope="class")
687-
def BSS_data() -> np.array:
687+
def BSS_data():
688688
return np.random.default_rng(3).integers(0, 100, 5)
689689

690690

0 commit comments

Comments
 (0)