lint long lines in self query and graph_qa

pull/21191/head
Eugene Yurtsev 2 months ago
parent fb8e1ad366
commit a094d8bb70

@ -46,9 +46,15 @@ DEPRECATED_LOOKUP = {
"KUZU_EXTRA_INSTRUCTIONS": "langchain_community.chains.graph_qa.prompts",
"KUZU_GENERATION_TEMPLATE": "langchain_community.chains.graph_qa.prompts",
"NEBULAGRAPH_EXTRA_INSTRUCTIONS": "langchain_community.chains.graph_qa.prompts",
"NEPTUNE_OPENCYPHER_EXTRA_INSTRUCTIONS": "langchain_community.chains.graph_qa.prompts",
"NEPTUNE_OPENCYPHER_GENERATION_SIMPLE_TEMPLATE": "langchain_community.chains.graph_qa.prompts",
"NEPTUNE_OPENCYPHER_GENERATION_TEMPLATE": "langchain_community.chains.graph_qa.prompts",
"NEPTUNE_OPENCYPHER_EXTRA_INSTRUCTIONS": (
"langchain_community.chains.graph_qa.prompts"
),
"NEPTUNE_OPENCYPHER_GENERATION_SIMPLE_TEMPLATE": (
"langchain_community.chains.graph_qa.prompts"
),
"NEPTUNE_OPENCYPHER_GENERATION_TEMPLATE": (
"langchain_community.chains.graph_qa.prompts"
),
"NGQL_GENERATION_TEMPLATE": "langchain_community.chains.graph_qa.prompts",
"SPARQL_GENERATION_SELECT_TEMPLATE": "langchain_community.chains.graph_qa.prompts",
"SPARQL_GENERATION_UPDATE_TEMPLATE": "langchain_community.chains.graph_qa.prompts",

@ -25,7 +25,7 @@ QUERY_CONSTRUCTOR_RUN_NAME = "query_constructor"
def _get_builtin_translator(vectorstore: VectorStore) -> Visitor:
"""Get the translator class corresponding to the vector store class."""
try:
import langchain_community
import langchain_community # noqa: F401
except ImportError:
raise ImportError(
"The langchain-community package must be installed to use this feature."

@ -11,7 +11,9 @@ if TYPE_CHECKING:
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
"DatabricksVectorSearchTranslator": "langchain_community.query_constructors.databricks_vector_search",
"DatabricksVectorSearchTranslator": (
"langchain_community.query_constructors.databricks_vector_search"
),
}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)

@ -11,7 +11,9 @@ if TYPE_CHECKING:
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
"TencentVectorDBTranslator": "langchain_community.query_constructors.tencentvectordb",
"TencentVectorDBTranslator": (
"langchain_community.query_constructors.tencentvectordb"
),
}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)

@ -11,7 +11,9 @@ if TYPE_CHECKING:
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
"TimescaleVectorTranslator": "langchain_community.query_constructors.timescalevector",
"TimescaleVectorTranslator": (
"langchain_community.query_constructors.timescalevector"
),
}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)

Loading…
Cancel
Save