From 7ddb1819f2e7288aac8692747411a973a7574b08 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sat, 23 Mar 2024 20:01:49 +0100 Subject: [PATCH] Fix two minor typing issues --- novelwriter/common.py | 2 +- novelwriter/text/counting.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/novelwriter/common.py b/novelwriter/common.py index 0c160fe9..55742b94 100644 --- a/novelwriter/common.py +++ b/novelwriter/common.py @@ -255,7 +255,7 @@ def formatFileFilter(extensions: list[str | tuple[str, str]]) -> str: result = [] for ext in extensions: if isinstance(ext, str): - result.append(f"{trConst(nwLabels.FILE_FILTERS.get(ext))} ({ext})") + result.append(f"{trConst(nwLabels.FILE_FILTERS.get(ext, 'ERR'))} ({ext})") elif isinstance(ext, tuple) and len(ext) == 2: result.append(f"{ext[0]} ({ext[1]})") return ";;".join(result) diff --git a/novelwriter/text/counting.py b/novelwriter/text/counting.py index 697cf5e8..59974ee5 100644 --- a/novelwriter/text/counting.py +++ b/novelwriter/text/counting.py @@ -120,7 +120,7 @@ def standardCounter(text: str) -> tuple[int, int, int]: return cCount, wCount, pCount -def bodyTextCounter(text: str | list[str]) -> tuple[int, int, int]: +def bodyTextCounter(text: str) -> tuple[int, int, int]: """A counter that counts body text words, characters, and characters without white spaces. """