Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4769f7b

Browse files
authored
Merge pull request #11684 from anntzer/style
Style
2 parents f6e2723 + 6138aa5 commit 4769f7b

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

examples/color/colormap_reference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def plot_color_gradients(cmap_category, cmap_list, nrows):
5252

5353
for ax, name in zip(axes, cmap_list):
5454
ax.imshow(gradient, aspect='auto', cmap=plt.get_cmap(name))
55-
pos = list(ax.get_position().bounds)
55+
pos = ax.get_position().bounds
5656
x_text = pos[0] - 0.01
5757
y_text = pos[1] + pos[3]/2.
5858
fig.text(x_text, y_text, name, va='center', ha='right', fontsize=10)

lib/matplotlib/backend_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
class Cursors(object):
2727
"""Simple namespace for cursor reference"""
28-
HAND, POINTER, SELECT_REGION, MOVE, WAIT = list(range(5))
28+
HAND, POINTER, SELECT_REGION, MOVE, WAIT = range(5)
2929
cursors = Cursors()
3030

3131
# Views positions tool

lib/matplotlib/backends/qt_editor/formlayout.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,8 @@ def setup(self):
243243
elif isinstance(value, str):
244244
field = QtWidgets.QLineEdit(value, self)
245245
elif isinstance(value, (list, tuple)):
246-
if isinstance(value, tuple):
247-
value = list(value)
248-
selindex = value.pop(0)
249246
field = QtWidgets.QComboBox(self)
247+
selindex, *value = value
250248
if isinstance(value[0], (list, tuple)):
251249
keys = [key for key, _val in value]
252250
value = [val for _key, val in value]

lib/mpl_toolkits/axes_grid1/parasite_axes.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,9 @@ def parasite_axes_class_factory(axes_class=None):
5454
class ParasiteAxesAuxTransBase:
5555
def __init__(self, parent_axes, aux_transform, viewlim_mode=None,
5656
**kwargs):
57-
5857
self.transAux = aux_transform
5958
self.set_viewlim_mode(viewlim_mode)
60-
61-
self._parasite_axes_class.__init__(self, parent_axes, **kwargs)
59+
super().__init__(parent_axes, **kwargs)
6260

6361
def _set_lim_and_transforms(self):
6462

@@ -176,8 +174,7 @@ def parasite_axes_auxtrans_class_factory(axes_class=None):
176174
parasite_axes_class = axes_class
177175
return type("%sParasiteAuxTrans" % parasite_axes_class.__name__,
178176
(ParasiteAxesAuxTransBase, parasite_axes_class),
179-
{'_parasite_axes_class': parasite_axes_class,
180-
'name': 'parasite_axes'})
177+
{'name': 'parasite_axes'})
181178

182179

183180
ParasiteAxesAuxTrans = parasite_axes_auxtrans_class_factory(

0 commit comments

Comments
 (0)