type annotation in forge
This commit is contained in:
parent
dba069d757
commit
fbc77c47e8
1 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ from time import sleep
|
|||
from .config_manager import get_config
|
||||
|
||||
|
||||
def get_timefile_exact(time):
|
||||
def get_timefile_exact(time) -> str:
|
||||
"""
|
||||
time is of type `datetime`; it is not "rounded" to match the real file;
|
||||
that work is done in get_timefile(time)
|
||||
|
@ -18,14 +18,14 @@ def get_timefile_exact(time):
|
|||
)
|
||||
|
||||
|
||||
def round_timefile(exact):
|
||||
def round_timefile(exact:datetime) -> datetime:
|
||||
"""
|
||||
This will round the datetime, so to match the file organization structure
|
||||
"""
|
||||
return datetime(exact.year, exact.month, exact.day, exact.hour)
|
||||
|
||||
|
||||
def get_timefile(exact):
|
||||
def get_timefile(exact:datetime) -> str:
|
||||
return get_timefile_exact(round_timefile(exact))
|
||||
|
||||
|
||||
|
@ -86,7 +86,7 @@ def mp3_join(named_intervals):
|
|||
return cmdline
|
||||
|
||||
|
||||
def create_mp3(start, end, outfile, options={}, **kwargs):
|
||||
def create_mp3(start: datetime, end: datetime, outfile: str, options={}, **kwargs):
|
||||
intervals = [
|
||||
(get_timefile(begin), start_cut, end_cut)
|
||||
for begin, start_cut, end_cut in get_files_and_intervals(start, end)
|
||||
|
|
Loading…
Reference in a new issue