I have a function which returns a function. I would like to find a proper type annotation. However, the returned function has *args and *kwargs. How is that annotated within Callable[[Parameters???], ReturnType]?
Example:
from typing import Callable
import io
import pandas as pd
def get_conversion_function(file_type: str) -> Callable[[io.BytesIO, TODO], pd.DataFrame]:
def to_csv(bytes_, *args, **kwargs):
return pd.read_csv(bytes_, **kwargs)
if file_type == "csv":
return to_csv