Skip to content

Commit

Permalink
chore: type hint issue (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
nautics889 authored Sep 8, 2023
1 parent 9e6a71a commit 1b5e942
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pandasai/helpers/code_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def __init__(
if self._config.middlewares is not None:
self.add_middlewares(*self._config.middlewares)

def add_middlewares(self, *middlewares: List[Middleware]):
def add_middlewares(self, *middlewares: Optional[Middleware]):
"""
Add middlewares to PandasAI instance.
Args:
*middlewares: A list of middlewares
*middlewares: Middlewares to be added
"""
self._middlewares.extend(middlewares)
Expand Down
4 changes: 2 additions & 2 deletions pandasai/smart_dataframe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@ def __setitem__(self, key, value):
def __repr__(self):
return self._df.__repr__()

def add_middlewares(self, *middlewares: List[Middleware]):
def add_middlewares(self, *middlewares: Optional[Middleware]):
"""
Add middlewares to PandasAI instance.
Args:
*middlewares: A list of middlewares
*middlewares: Middlewares to be added
"""
self._dl.add_middlewares(*middlewares)
Expand Down
4 changes: 2 additions & 2 deletions pandasai/smart_datalake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ def _load_llm(self, llm: LLM):

self._llm = llm

def add_middlewares(self, *middlewares: List[Middleware]):
def add_middlewares(self, *middlewares: Optional[Middleware]):
"""
Add middlewares to PandasAI instance.
Args:
*middlewares: A list of middlewares
*middlewares: Middlewares to be added
"""
self._code_manager.add_middlewares(*middlewares)

Expand Down

0 comments on commit 1b5e942

Please sign in to comment.