mirror of
https://github.com/hwchase17/langchain
synced 2024-11-10 01:10:59 +00:00
community[patch]: fix formatting (#24443)
Somehow this got through CI: https://github.com/langchain-ai/langchain/pull/24363
This commit is contained in:
parent
242b085be7
commit
f99369a54c
@ -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
|
||||
|
@ -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:"),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user