some pep8 fixes

This commit is contained in:
localhost_frssoft 2024-07-11 22:07:09 +03:00
parent 7a78aa6244
commit 1ecaddfaff

View File

@ -15,8 +15,9 @@ from loguru import logger
def get_peertube_stream_name(): def get_peertube_stream_name():
try: try:
return requests.get("https://xxivproduction.video/api/v1/videos/1FZeVVVzWBFShaxQVkYiXd").json()['name'] return requests.get("https://xxivproduction.video/api/v1/videos/1FZeVVVzWBFShaxQVkYiXd").json()['name']
except: except Exception as E:
return "[не удалось получить название]" return f"[не удалось получить название {E}]"
@logger.catch @logger.catch
def get_control_mention(): def get_control_mention():
@ -72,7 +73,7 @@ def get_control_mention():
write_states(states_stor.states) write_states(states_stor.states)
break break
if now_hour == 0: if now_hour == 0:
logger.warning(f'Автоматический триггер в полночи сработал') logger.warning('Автоматический триггер в полночи сработал')
thread_created_at = time_now thread_created_at = time_now
delta = relativedelta(hour=hour_poll_posting, minute=0, second=0, weekday=TU(1)) delta = relativedelta(hour=hour_poll_posting, minute=0, second=0, weekday=TU(1))