lint
This commit is contained in:
@@ -242,7 +242,7 @@ class Communicate:
|
||||
|
||||
word_boundary = str(word_boundary).lower()
|
||||
|
||||
websocket_max_size = 2**16
|
||||
websocket_max_size = 2 ** 16
|
||||
overhead_per_message = (
|
||||
len(
|
||||
ssml_headers_plus_data(
|
||||
@@ -337,9 +337,9 @@ class Communicate:
|
||||
metadata_duration = metadata["Metadata"][0]["Data"][
|
||||
"Duration"
|
||||
]
|
||||
metadata_text = metadata["Metadata"][0]["Data"]["text"][
|
||||
"Text"
|
||||
]
|
||||
metadata_text = metadata["Metadata"][0]["Data"][
|
||||
"text"
|
||||
]["Text"]
|
||||
yield (
|
||||
[
|
||||
metadata_offset,
|
||||
|
||||
@@ -28,9 +28,9 @@ def mktimestamp(time_unit):
|
||||
Returns:
|
||||
str: The timecode of the subtitle.
|
||||
"""
|
||||
hour = math.floor(time_unit / 10**7 / 3600)
|
||||
minute = math.floor((time_unit / 10**7 / 60) % 60)
|
||||
seconds = (time_unit / 10**7) % 60
|
||||
hour = math.floor(time_unit / 10 ** 7 / 3600)
|
||||
minute = math.floor((time_unit / 10 ** 7 / 60) % 60)
|
||||
seconds = (time_unit / 10 ** 7) % 60
|
||||
return f"{hour:02d}:{minute:02d}:{seconds:06.3f}"
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class SubMaker:
|
||||
subtitles should overlap.
|
||||
"""
|
||||
self.subs_and_offset = []
|
||||
self.overlapping = overlapping * (10**7)
|
||||
self.overlapping = overlapping * (10 ** 7)
|
||||
|
||||
def create_sub(self, timestamp, text):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user