Skip to content

Commit fc270b1

Browse files
committed
Fix typing of "result"
1 parent 23185fd commit fc270b1

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/msgcheck/msgcheck.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def msgcheck_args(parser: argparse.ArgumentParser) -> argparse.Namespace:
167167
return parser.parse_args(shlex.split(os.getenv("MSGCHECK_OPTIONS") or "") + sys.argv[1:])
168168

169169

170-
def msgcheck_check_files(args: argparse.Namespace) -> tuple[str, list[PoReport]]:
170+
def msgcheck_check_files(args: argparse.Namespace) -> list[tuple[str, list[PoReport]]]:
171171
"""Check files."""
172172
# create checker and set boolean options
173173
po_check = PoCheck()
@@ -195,7 +195,10 @@ def msgcheck_check_files(args: argparse.Namespace) -> tuple[str, list[PoReport]]
195195
return result
196196

197197

198-
def msgcheck_display_errors(args: argparse.Namespace, result: tuple[str, list[PoReport]]) -> tuple[int, int, int]:
198+
def msgcheck_display_errors(
199+
args: argparse.Namespace,
200+
result: list[tuple[str, list[PoReport]]],
201+
) -> tuple[int, int, int]:
199202
"""Display error messages."""
200203
files_ok, files_with_errors, total_errors = 0, 0, 0
201204
for _, reports in result:
@@ -215,7 +218,7 @@ def msgcheck_display_errors(args: argparse.Namespace, result: tuple[str, list[Po
215218
return files_ok, files_with_errors, total_errors
216219

217220

218-
def msgcheck_display_result(args: argparse.Namespace, result: tuple[str, list[PoReport]]) -> int:
221+
def msgcheck_display_result(args: argparse.Namespace, result: list[tuple[str, list[PoReport]]]) -> int:
219222
"""Display result and return the number of files with errors."""
220223
# display errors
221224
files_ok, files_with_errors, total_errors = msgcheck_display_errors(args, result)

src/msgcheck/po.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def check_pofile(self, po_file: PoFile) -> list[PoReport]:
609609

610610
return reports
611611

612-
def check_files(self, files: list[str]) -> tuple[str, list[PoReport]]:
612+
def check_files(self, files: list[str]) -> list[tuple[str, list[PoReport]]]:
613613
"""Check translations in PO files.
614614
615615
Return a list of tuples: (filename, [PoReport, PoReport, ...]).

0 commit comments

Comments
 (0)