From c907c006db2916c0726357fd7c495c93a5dfc3c0 Mon Sep 17 00:00:00 2001 From: Balakrishnan Balasubramanian Date: Wed, 21 Dec 2022 21:29:53 -0500 Subject: [PATCH] improve type annotations --- vimtabdiff.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vimtabdiff.py b/vimtabdiff.py index 981c5fb..d84705b 100755 --- a/vimtabdiff.py +++ b/vimtabdiff.py @@ -11,13 +11,13 @@ import tempfile import subprocess import shlex from pathlib import Path -from typing import Callable, TypeVar -from collections.abc import Iterator, Sequence +from typing import TypeVar +from collections.abc import Iterator, Callable -T = TypeVar('T') +R = TypeVar('R') -def star(f: Callable[..., T]) -> Callable[[Sequence], T]: +def star(f: Callable[..., R]) -> Callable[[tuple], R]: """ see https://stackoverflow.com/q/21892989 """ return lambda args: f(*args)