pep8 compliance: E302 expected 2 blank lines
This commit is contained in:
parent
490318a0a7
commit
928011230a
@ -49,32 +49,39 @@ clicked_widget = None # Target of mouse_drag and mouse_up events
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
class Cancel(Exception):
|
||||
pass
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
def set_modifier(key, value):
|
||||
attr = modkeys.get(key)
|
||||
if attr:
|
||||
modifiers[attr] = value
|
||||
|
||||
|
||||
def add_modifiers(event):
|
||||
d = event.dict
|
||||
d.update(modifiers)
|
||||
d['cmd'] = event.ctrl or event.meta
|
||||
|
||||
|
||||
def get_root():
|
||||
return root_widget
|
||||
|
||||
|
||||
def get_top_widget():
|
||||
return top_widget
|
||||
|
||||
|
||||
def get_focus():
|
||||
return top_widget.get_focus()
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
class RootWidget(Widget):
|
||||
# surface Pygame display surface
|
||||
# is_gl True if OpenGL surface
|
||||
@ -388,6 +395,7 @@ from bisect import insort
|
||||
|
||||
scheduled_calls = []
|
||||
|
||||
|
||||
def make_scheduled_calls():
|
||||
sched = scheduled_calls
|
||||
t = time()
|
||||
@ -395,6 +403,7 @@ def make_scheduled_calls():
|
||||
sched[0][1]()
|
||||
sched.pop(0)
|
||||
|
||||
|
||||
def schedule(delay, func):
|
||||
"""Arrange for the given function to be called after the specified
|
||||
delay in seconds. Scheduled functions are called synchronously from
|
||||
|
Reference in New Issue
Block a user