Ran black on branc
This commit is contained in:
parent
6effb6f456
commit
4ea6209123
230 changed files with 7108 additions and 2395 deletions
|
|
@ -22,7 +22,9 @@ class BaseOption(object):
|
|||
"""
|
||||
|
||||
def __str__(self):
|
||||
return "<Option {key}: {value}>".format(key=self.key, value=crop(str(self.value), width=10))
|
||||
return "<Option {key}: {value}>".format(
|
||||
key=self.key, value=crop(str(self.value), width=10)
|
||||
)
|
||||
|
||||
def __repr__(self):
|
||||
return str(self)
|
||||
|
|
@ -307,7 +309,9 @@ class Datetime(BaseOption):
|
|||
def deserialize(self, save_data):
|
||||
if isinstance(save_data, int):
|
||||
return datetime.datetime.utcfromtimestamp(save_data)
|
||||
raise ValueError(f"{self.key} expected UTC Datetime in EPOCH format, got '{save_data}'")
|
||||
raise ValueError(
|
||||
f"{self.key} expected UTC Datetime in EPOCH format, got '{save_data}'"
|
||||
)
|
||||
|
||||
def serialize(self):
|
||||
return int(self.value_storage.strftime("%s"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue