Most of the pep8 changes finished. Be careful, things may be horribly broken.
This commit is contained in:
@@ -18,34 +18,34 @@ class command():
|
||||
def shutdown(self):
|
||||
pass
|
||||
|
||||
def getDescription(self):
|
||||
def get_description(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool(
|
||||
if not self.env['runtime']['SettingsManager'].get_setting_as_bool(
|
||||
'speech', 'autoReadIncoming'):
|
||||
return
|
||||
# is there something to read?
|
||||
if not self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
|
||||
if not self.env['runtime']['ScreenManager'].is_delta(ignoreSpace=True):
|
||||
return
|
||||
|
||||
# this must be a keyecho or something
|
||||
# if len(self.env['screen']['newDelta'].strip(' \n\t')) <= 1:
|
||||
xMove = abs(
|
||||
self.env['screen']['newCursor']['x'] -
|
||||
self.env['screen']['oldCursor']['x'])
|
||||
yMove = abs(
|
||||
self.env['screen']['newCursor']['y'] -
|
||||
self.env['screen']['oldCursor']['y'])
|
||||
# if len(self.env['screen']['new_delta'].strip(' \n\t')) <= 1:
|
||||
x_move = abs(
|
||||
self.env['screen']['new_cursor']['x'] -
|
||||
self.env['screen']['old_cursor']['x'])
|
||||
y_move = abs(
|
||||
self.env['screen']['new_cursor']['y'] -
|
||||
self.env['screen']['old_cursor']['y'])
|
||||
|
||||
if (xMove >= 1) and xMove == len(self.env['screen']['newDelta']):
|
||||
# if len(self.env['screen']['newDelta'].strip(' \n\t0123456789'))
|
||||
if (x_move >= 1) and x_move == len(self.env['screen']['new_delta']):
|
||||
# if len(self.env['screen']['new_delta'].strip(' \n\t0123456789'))
|
||||
# <= 2:
|
||||
if '\n' not in self.env['screen']['newDelta']:
|
||||
if '\n' not in self.env['screen']['new_delta']:
|
||||
return
|
||||
# print(xMove, yMove, len(self.env['screen']['newDelta']), len(self.env['screen']['newNegativeDelta']))
|
||||
self.env['runtime']['outputManager'].presentText(
|
||||
self.env['screen']['newDelta'], interrupt=False, flush=False)
|
||||
# print(x_move, y_move, len(self.env['screen']['new_delta']), len(self.env['screen']['newNegativeDelta']))
|
||||
self.env['runtime']['OutputManager'].present_text(
|
||||
self.env['screen']['new_delta'], interrupt=False, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
def set_callback(self, callback):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user