improve type annotations

This commit is contained in:
Balakrishnan Balasubramanian 2022-12-21 21:29:53 -05:00
parent fdae5aa6de
commit c907c006db

View File

@ -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)