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

Skip to content

Commit d711940

Browse files
tacaswellblink1073
authored andcommitted
MNT : pep8 + pyflake changes
- strip white space - rearrange 'not's
1 parent 51c70f0 commit d711940

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/widgets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ def ignore(self, event):
11551155
# Only do rectangle selection if event was triggered
11561156
# with a desired button
11571157
if self.validButtons is not None:
1158-
if not event.button in self.validButtons:
1158+
if event.button not in self.validButtons:
11591159
return True
11601160

11611161
# If no button was pressed yet ignore the event if it was out
@@ -1164,7 +1164,7 @@ def ignore(self, event):
11641164
return event.inaxes != self.ax
11651165

11661166
# If a button was pressed, check if the release-button is the
1167-
# same.
1167+
# same.
11681168
if event.button == self.eventpress.button:
11691169
return False
11701170

@@ -1217,7 +1217,7 @@ def press(self, event):
12171217

12181218
def release(self, event):
12191219
"""Button release event"""
1220-
if not self.ignore(event) and not self.eventpress is None:
1220+
if not self.ignore(event) and self.eventpress is not None:
12211221
self.eventrelease = copy.copy(event)
12221222
self.eventrelease.xdata, self.eventrelease.ydata = (
12231223
self._get_data(event))

0 commit comments

Comments
 (0)