8000 Whitespace adjustments for PEP8 compliance · smithsp/matplotlib@83bc3e1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 83bc3e1

Browse files
HastingsGreerfariza
authored andcommitted
Whitespace adjustments for PEP8 compliance
1 parent 8ba2bdf commit 83bc3e1

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

lib/matplotlib/widgets.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -684,10 +684,6 @@ def __init__(self, ax, label, initial = '',
684684
self.params_to_disable += [key]
685685

686686
self.text = initial
687-
688-
689-
690-
691687
self.label = ax.text(0.0,0.5, label,
692688
verticalalignment='center',
693689
horizontalalignment='right',
@@ -705,7 +701,6 @@ def __init__(self, ax, label, initial = '',
705701
self.cursor = self.ax.vlines(0, 0, 0) #because this is initialized, _render_cursor
706702
self.cursor.set_visible(False) #can assume that cursor exists
707703

708-
709704
self.connect_event('button_press_event', self._click)
710705
self.connect_event('button_release_event', self._release)
711706
self.connect_event('motion_notify_event', self._motion)
@@ -720,10 +715,7 @@ def __init__(self, ax, label, initial = '',
720715
self._lastcolor = color
721716

722717
self.capturekeystrokes = False
723-
724-
725-
726-
718+
727719
def _make_text_disp(self, string):
728720
return self.ax.text(self.DIST_FROM_LEFT, 0.5, string,
729721
verticalalignment='center',
@@ -739,8 +731,7 @@ def _rendercursor(self):
739731
no_text = False
740732
if(widthtext == "" or widthtext == " " or widthtext == " "):
741733
no_text = widthtext == ""
742-
widthtext = ","
743-
734+
widthtext = ","
744735

745736
wt_disp = self._make_text_disp(widthtext)
746737

@@ -752,8 +743,7 @@ def _rendercursor(self):
752743
if no_text:
753744
bb[1, 0] = bb[0, 0]
754745
#hack done
755-
self.cursor.set_visible(False)
756-
746+
self.cursor.set_visible(False)
757747

758748
self.cursor = self.ax.vlines(bb[1, 0], bb[0, 1], bb[1, 1])
759749
self.ax.figure.canvas.draw()
@@ -838,7 +828,6 @@ def _click(self, event):
838828
self.cursor_index = len(self.text)
839829
self._rendercursor()
840830

841-
842831
def _motion(self, event):
843832
if self.ignore(event):
844833
return
@@ -862,6 +851,7 @@ def on_text_change(self, func):
862851
self.change_observers[cid] = func
863852
self.cnt += 1
864853
return cid
854+
865855
def on_submit(self, func):
866856
"""
867857
When the user hits enter or leaves the submision box, call this *func* with event
@@ -872,6 +862,7 @@ def on_submit(self, func):
872862
self.submit_observers[cid] = func
873863
self.cnt += 1
874864
return cid
865+
875866
def disconnect(self, cid):
876867
"""remove the observer with connection id *cid*"""
877868
try:

0 commit comments

Comments
 (0)
0