Skip to content

Commit 22b44b4

Browse files
fix forward reference type hints
Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com> Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com>
1 parent 15a2746 commit 22b44b4

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

wdoc/utils/tasks/query.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,15 +556,21 @@ def semantic_batching(
556556

557557

558558
def pbar_chain(
559-
llm: Union["langchain_litellm.ChatLiteLLM", "FakeListChatModel"],
559+
llm: Union[
560+
"langchain_litellm.ChatLiteLLM",
561+
"langchain_community.chat_models.fake.FakeListChatModel",
562+
],
560563
len_func: str,
561564
**tqdm_kwargs,
562565
) -> RunnableLambda:
563566
"create a chain that just sets a tqdm progress bar"
564567

565568
def actual_pbar_chain(
566569
inputs: Union[dict, List],
567-
llm: Union["langchain_litellm.ChatLiteLLM", "FakeListChatModel"] = llm,
570+
llm: Union[
571+
"langchain_litellm.ChatLiteLLM",
572+
"langchain_community.chat_models.fake.FakeListChatModel",
573+
] = llm,
568574
) -> Union[dict, List]:
569575

570576
llm.callbacks[0].pbar.append(
@@ -584,13 +590,19 @@ def actual_pbar_chain(
584590

585591

586592
def pbar_closer(
587-
llm: Union["langchain_litellm.ChatLiteLLM", "FakeListChatModel"],
593+
llm: Union[
594+
"langchain_litellm.ChatLiteLLM",
595+
"langchain_community.chat_models.fake.FakeListChatModel",
596+
],
588597
) -> RunnableLambda:
589598
"close a pbar created by pbar_chain"
590599

591600
def actual_pbar_closer(
592601
inputs: Union[dict, List],
593-
llm: Union["langchain_litellm.ChatLiteLLM", "FakeListChatModel"] = llm,
602+
llm: Union[
603+
"langchain_litellm.ChatLiteLLM",
604+
"langchain_community.chat_models.fake.FakeListChatModel",
605+
] = llm,
594606
) -> Union[dict, List]:
595607
pbar = llm.callbacks[0].pbar[-1]
596608
pbar.update(pbar.total - pbar.n)

wdoc/wdoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ def print_exception(exc_type, exc_value, exc_traceback):
647647
self.interaction_settings
648648
)
649649

650-
def summary_task(self) -> "wdocSummary":
650+
def summary_task(self) -> "wdoc.utils.tasks.summarize.wdocSummary":
651651
from wdoc.utils.tasks.summarize import summarize_documents
652652

653653
docs_tkn_cost = {}

0 commit comments

Comments
 (0)