Type hints on varargs and kwargs that take anything should be Any. (#11950)

Type hinting `*args` as `List[Any]` means that each positional argument
should be a list. Type hinting `**kwargs` as `Dict[str, Any]` means that
each keyword argument should be a dict of strings.

This is almost never what we actually wanted, and doesn't seem to be
what we want in any of the cases I'm replacing here.
This commit is contained in:
Predrag Gruevski
2023-10-17 21:31:44 -04:00
committed by GitHub
parent 7f17ce3742
commit 392df7b2e3
15 changed files with 16 additions and 16 deletions

View File

@@ -42,7 +42,7 @@ def create_spark_dataframe_agent(
max_execution_time: Optional[float] = None,
early_stopping_method: str = "force",
agent_executor_kwargs: Optional[Dict[str, Any]] = None,
**kwargs: Dict[str, Any],
**kwargs: Any,
) -> AgentExecutor:
"""Construct a Spark agent from an LLM and dataframe."""