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

Skip to content

Commit 472a046

Browse files
tacaswellQuLogic
andauthored
MNT: simplify logic
No need for map when a single list comprehension will do. Co-authored-by: Elliott Sales de Andrade <[email protected]>
1 parent feb16f1 commit 472a046

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_qt5.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ def drawRectangle(self, rect):
486486
# Draw the zoom rectangle to the QPainter. _draw_rect_callback needs
487487
# to be called at the end of paintEvent.
488488
if rect is not None:
489-
x0, y0, w, h = map(int, [pt / self._dpi_ratio for pt in rect])
489+
x0, y0, w, h = [int(pt / self._dpi_ratio) for pt in rect]
490490
x1 = x0 + w
491491
y1 = y0 + h
492492
def _draw_rect_callback(painter):

0 commit comments

Comments
 (0)