From 479cc086ba35a0be3b373a7b8332ffbab7835d87 Mon Sep 17 00:00:00 2001 From: William FH <13333726+hinthornw@users.noreply.github.com> Date: Tue, 25 Jul 2023 18:20:58 -0700 Subject: [PATCH] Rm Github Import (#8257) It's not a required dep but would break peoples builds --------- Co-authored-by: Bagatur --- libs/langchain/langchain/utilities/github.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libs/langchain/langchain/utilities/github.py b/libs/langchain/langchain/utilities/github.py index 8a8b30b426..8bc845363d 100644 --- a/libs/langchain/langchain/utilities/github.py +++ b/libs/langchain/langchain/utilities/github.py @@ -1,12 +1,16 @@ """Util that calls GitHub.""" -import json -from typing import Any, Dict, List, Optional +from __future__ import annotations + +import json +from typing import TYPE_CHECKING, Any, Dict, List, Optional -from github.Issue import Issue from pydantic import BaseModel, Extra, root_validator from langchain.utils import get_from_dict_or_env +if TYPE_CHECKING: + from github.Issue import Issue + class GitHubAPIWrapper(BaseModel): """Wrapper for GitHub API."""