forked from AFPy/potodo
Fixed tox errors
This commit is contained in:
parent
1880a7a97b
commit
7cab885d57
1
.github/workflows/tests.yml
vendored
1
.github/workflows/tests.yml
vendored
|
@ -12,6 +12,7 @@ jobs:
|
|||
test:
|
||||
name: Run tox
|
||||
runs-on: ubuntu-latest
|
||||
# TODO: Add macos-latest
|
||||
strategy:
|
||||
matrix:
|
||||
tox:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user