Skip to content

The agent engineering platform.

community[patch]: fix formatting (#24443)

ccurmef99369a54ca3
diff --git a/libs/community/langchain_community/tools/gmail/search.py b/libs/community/langchain_community/tools/gmail/search.py
index c2d5ef436e..72125762d5 100644
--- a/libs/community/langchain_community/tools/gmail/search.py
+++ b/libs/community/langchain_community/tools/gmail/search.py
@@ -118,10 +118,10 @@ class GmailSearch(GmailBaseTool):
"body": body,
"subject": subject,
"sender": sender,
- "from": email_msg['From'],
- "date": email_msg['Date'],
- "to": email_msg['To'],
- "cc": email_msg['Cc'],
+ "from": email_msg["From"],
+ "date": email_msg["Date"],
+ "to": email_msg["To"],
+ "cc": email_msg["Cc"],
}
)
return results
diff --git a/libs/community/tests/unit_tests/graph_vectorstores/extractors/test_hierarchy_link_extractor.py b/libs/community/tests/unit_tests/graph_vectorstores/extractors/test_hierarchy_link_extractor.py
index 109583f6e3..9d9b939650 100644
--- a/libs/community/tests/unit_tests/graph_vectorstores/extractors/test_hierarchy_link_extractor.py
+++ b/libs/community/tests/unit_tests/graph_vectorstores/extractors/test_hierarchy_link_extractor.py
@@ -14,21 +14,21 @@ def test_up_only() -> None:
assert extractor.extract_one(PATH_1) == {
# Path1 links up to Root/H1
- Link.outgoing(kind="hierarchy", tag="up:Root/H1"),
+ Link.outgoing(kind="hierarchy", tag="p:Root/H1"),
# Path1 is linked to by stuff under Root/H1/h2
- Link.incoming(kind="hierarchy", tag="up:Root/H1/h2"),
+ Link.incoming(kind="hierarchy", tag="p:Root/H1/h2"),
}
assert extractor.extract_one(PATH_2) == {
# Path2 links up to Root
- Link.outgoing(kind="hierarchy", tag="up:Root"),
+ Link.outgoing(kind="hierarchy", tag="p:Root"),
# Path2 is linked to by stuff under Root/H1/h2
- Link.incoming(kind="hierarchy", tag="up:Root/H1"),
+ Link.incoming(kind="hierarchy", tag="p:Root/H1"),
}
assert extractor.extract_one(PATH_3) == {
# Path3 is linked to by stuff under Root
- Link.incoming(kind="hierarchy", tag="up:Root"),
+ Link.incoming(kind="hierarchy", tag="p:Root"),
}
@@ -37,31 +37,31 @@ def test_up_and_down() -> None:
assert extractor.extract_one(PATH_1) == {
# Path1 links up to Root/H1
- Link.outgoing(kind="hierarchy", tag="up:Root/H1"),
+ Link.outgoing(kind="hierarchy", tag="p:Root/H1"),
# Path1 is linked to by stuff under Root/H1/h2
- Link.incoming(kind="hierarchy", tag="up:Root/H1/h2"),
+ Link.incoming(kind="hierarchy", tag="p:Root/H1/h2"),
# Path1 links down to things under Root/H1/h2.
- Link.outgoing(kind="hierarchy", tag="down:Root/H1/h2"),
+ Link.outgoing(kind="hierarchy", tag="c:Root/H1/h2"),
# Path1 is linked down to by Root/H1
- Link.incoming(kind="hierarchy", tag="down:Root/H1"),
+ Link.incoming(kind="hierarchy", tag="c:Root/H1"),
}
assert extractor.extract_one(PATH_2) == {
# Path2 links up to Root
- Link.outgoing(kind="hierarchy", tag="up:Root"),
+ Link.outgoing(kind="hierarchy", tag="p:Root"),
# Path2 is linked to by stuff under Root/H1/h2
- Link.incoming(kind="hierarchy", tag="up:Root/H1"),
+ Link.incoming(kind="hierarchy", tag="p:Root/H1"),
# Path2 links down to things under Root/H1.
- Link.outgoing(kind="hierarchy", tag="down:Root/H1"),
+ Link.outgoing(kind="hierarchy", tag="c:Root/H1"),
# Path2 is linked down to by Root
- Link.incoming(kind="hierarchy", tag="down:Root"),
+ Link.incoming(kind="hierarchy", tag="c:Root"),
}
assert extractor.extract_one(PATH_3) == {
# Path3 is linked to by stuff under Root
- Link.incoming(kind="hierarchy", tag="up:Root"),
+ Link.incoming(kind="hierarchy", tag="p:Root"),
# Path3 links down to things under Root/H1.
- Link.outgoing(kind="hierarchy", tag="down:Root"),
+ Link.outgoing(kind="hierarchy", tag="c:Root"),
}
@@ -70,15 +70,15 @@ def test_sibling() -> None:
assert extractor.extract_one(PATH_1) == {
# Path1 links with anything else in Root/H1
- Link.bidir(kind="hierarchy", tag="sib:Root/H1"),
+ Link.bidir(kind="hierarchy", tag="s:Root/H1"),
}
assert extractor.extract_one(PATH_2) == {
# Path2 links with anything else in Root
- Link.bidir(kind="hierarchy", tag="sib:Root"),
+ Link.bidir(kind="hierarchy", tag="s:Root"),
}
assert extractor.extract_one(PATH_3) == {
# Path3 links with anything else at the top level
- Link.bidir(kind="hierarchy", tag="sib:"),
+ Link.bidir(kind="hierarchy", tag="s:"),
}