Skip to content

Commit 2f186ad

Browse files
committed
Corrected to be PEP8 compliant.
1 parent bb25e5e commit 2f186ad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/backends/backend_qt5.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,9 @@ def _update_figure_dpi(self):
268268
@property
269269
def _dpi_ratio(self):
270270
# Not available on Qt4 or some older Qt5.
271-
try:
272-
return self.devicePixelRatio() or 1 # can be 0 in rare cases
271+
try:
272+
# self.devicePixelRatio() returns 0 in rare cases
273+
return self.devicePixelRatio() or 1
273274
except AttributeError:
274275
return 1
275276

0 commit comments

Comments
 (0)