More pep8 fixes. A tiny bit of refactoring.
This commit is contained in:
@ -2,14 +2,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core.i18n import _
|
||||
# By Chrys, Storm Dragon, and contributors.
|
||||
|
||||
import datetime
|
||||
|
||||
from fenrirscreenreader.core.i18n import _
|
||||
|
||||
class command():
|
||||
|
||||
class command:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@ -20,20 +20,23 @@ class command():
|
||||
pass
|
||||
|
||||
def get_description(self):
|
||||
return _('presents the date')
|
||||
return _("presents the date")
|
||||
|
||||
def run(self):
|
||||
date_format = self.env['runtime']['SettingsManager'].get_setting(
|
||||
'general', 'date_format')
|
||||
date_format = self.env["runtime"]["SettingsManager"].get_setting(
|
||||
"general", "date_format"
|
||||
)
|
||||
|
||||
# get the time formatted
|
||||
date_string = datetime.datetime.strftime(
|
||||
datetime.datetime.now(), date_format)
|
||||
datetime.datetime.now(), date_format
|
||||
)
|
||||
|
||||
# present the time via speak and braile, there is no soundicon,
|
||||
# interrupt the current speech
|
||||
self.env['runtime']['OutputManager'].present_text(
|
||||
date_string, sound_icon ='', interrupt=True)
|
||||
self.env["runtime"]["OutputManager"].present_text(
|
||||
date_string, sound_icon="", interrupt=True
|
||||
)
|
||||
|
||||
def set_callback(self, callback):
|
||||
pass
|
||||
|
Reference in New Issue
Block a user