8000 Remove superfluous list() call when unpacking map() · matplotlib/matplotlib@4e0e1ce · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4e0e1ce

Browse files
committed
Remove superfluous list() call when unpacking map()
1 parent 6582a9d commit 4e0e1ce

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/matplotlib/axes/_subplots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self, fig, *args, **kwargs):
4343
else:
4444
try:
4545
s = str(int(args[0]))
46-
rows, cols, num = list(map(int, s))
46+
rows, cols, num = map(int, s)
4747
except ValueError:
4848
raise ValueError(
4949
'Single argument to subplot must be a 3-digit '

lib/matplotlib/patches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ def getpoints(self, x1, y1, x2, y2, k):
13761376
line and intersects (*x2*, *y2*) and the distance from (*x2*,
13771377
*y2*) of the returned points is *k*.
13781378
"""
1379-
x1, y1, x2, y2, k = list(map(float, (x1, y1, x2, y2, k)))
1379+
x1, y1, x2, y2, k = map(float, (x1, y1, x2, y2, k))
13801380

13811381
if y2 - y1 == 0:
13821382
return x2, y2 + k, x2, y2 - k

lib/mpl_toolkits/axes_grid1/axes_divider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def __init__(self, fig, *args, **kwargs):
385385
else:
386386
try:
387387
s = str(int(args[0]))
388-
rows, cols, num = list(map(int, s))
388+
rows, cols, num = map(int, s)
389389
except ValueError:
390390
raise ValueError(
391391
'Single argument to subplot must be a 3-digit integer')

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def autoscale(self, enable=True, axis='both', tight=None):
470470
scalez=scalez)
471471

472472
def auto_scale_xyz(self, X, Y, Z=None, had_data=None):
473-
x, y, z = list(map(np.asarray, (X, Y, Z)))
473+
x, y, z = map(np.asarray, (X, Y, Z))
474474
try:
475475
x, y = x.flatten(), y.flatten()
476476
if Z is not None:

0 commit comments

Comments
 (0)
0