community[patch]: fix formatting (#24443)

Somehow this got through CI:
https://github.com/langchain-ai/langchain/pull/24363
This commit is contained in:
ccurme 2024-07-19 10:38:53 -04:00 committed by GitHub
parent 242b085be7
commit f99369a54c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 22 deletions

View File

@ -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

View File

@ -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:"),
}