Fixed tox errors

This commit is contained in:
Jules Lasne 2020-11-26 15:19:35 +01:00
parent 1880a7a97b
commit 7cab885d57
3 changed files with 12 additions and 5 deletions

View File

@ -12,6 +12,7 @@ jobs:
test:
name: Run tox
runs-on: ubuntu-latest
# TODO: Add macos-latest
strategy:
matrix:
tox:

View File

@ -12,7 +12,8 @@ from potodo.po_file import PoFileStats
def get_cache_file_content(
cache_args: Any, path: str = ".potodo/cache.pickle",
cache_args: Any,
path: str = ".potodo/cache.pickle",
) -> Dict[Path, PoFileStats]:
logging.debug("Trying to load cache from %s", path)
try:

View File

@ -154,8 +154,9 @@ def non_interactive_output(
)
)
else:
total_completion = 100 * total_translated / total_entries
print(f"\n\n# TOTAL ({total_completion:.2f}% done)\n")
if total_entries != 0:
total_completion = 100 * total_translated / total_entries
print(f"\n\n# TOTAL ({total_completion:.2f}% done)\n")
def exec_potodo(
@ -340,11 +341,15 @@ def buffer_add(
def main() -> None:
parser = argparse.ArgumentParser(
prog="potodo", description="List and prettify the po files left to translate.",
prog="potodo",
description="List and prettify the po files left to translate.",
)
parser.add_argument(
"-p", "--path", help="execute Potodo in path", metavar="path",
"-p",
"--path",
help="execute Potodo in path",
metavar="path",
)
parser.add_argument(