refactor: Organize code to remove flake8 issues

This commit is contained in:
Cristian 2020-07-24 12:25:25 -05:00
parent f4c0616332
commit 6006b4f93b
24 changed files with 43 additions and 39 deletions

View file

@ -5,8 +5,6 @@ import os
import sys
import time
import argparse
import logging
import signal
from multiprocessing import Process
from datetime import datetime
@ -263,9 +261,9 @@ def log_archiving_finished(num_links: int):
assert _LAST_RUN_STATS.archiving_start_ts is not None
seconds = end_ts.timestamp() - _LAST_RUN_STATS.archiving_start_ts.timestamp()
if seconds > 60:
duration = '{0:.2f} min'.format(seconds / 60, 2)
duration = '{0:.2f} min'.format(seconds / 60)
else:
duration = '{0:.2f} sec'.format(seconds, 2)
duration = '{0:.2f} sec'.format(seconds)
print()
print('{}[√] [{}] Update of {} pages complete ({}){}'.format(
@ -385,8 +383,8 @@ def log_removal_started(links: List["Link"], yes: bool, delete: bool):
)
else:
print(
f' Matching links will be de-listed from the main index, but their archived content folders will remain in place on disk.\n'
f' (Pass --delete if you also want to permanently delete the data folders)'
' Matching links will be de-listed from the main index, but their archived content folders will remain in place on disk.\n'
' (Pass --delete if you also want to permanently delete the data folders)'
)
if not yes: