Fix two minor typing issues

This commit is contained in:
Veronica Berglyd Olsen
2024-03-23 20:01:49 +01:00
parent ded03e10c5
commit 7ddb1819f2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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.
"""