From 3663272b88e4b23f0c48e273741b7c1fac6b31f2 Mon Sep 17 00:00:00 2001 From: Niklas Fiekas Date: Sat, 21 May 2022 11:57:57 +0200 Subject: [PATCH] Add type annotations for _condense_affix() --- chess/pgn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chess/pgn.py b/chess/pgn.py index 65c008d65..85002140a 100644 --- a/chess/pgn.py +++ b/chess/pgn.py @@ -143,8 +143,8 @@ (?P\s?) """, re.VERBOSE) -def _condense_affix(infix: str): - def repl(match): +def _condense_affix(infix: str) -> Callable[[typing.Match[str]], str]: + def repl(match: typing.Match[str]) -> str: if infix: return match.group("prefix") + infix + match.group("suffix") else: