Skip to content

Commit f99369a

Browse files
authored
community[patch]: fix formatting (#24443)
Somehow this got through CI: #24363
1 parent 242b085 commit f99369a

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

libs/community/langchain_community/tools/gmail/search.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ def _parse_messages(self, messages: List[Dict[str, Any]]) -> List[Dict[str, Any]
118118
"body": body,
119119
"subject": subject,
120120
"sender": sender,
121-
"from": email_msg['From'],
122-
"date": email_msg['Date'],
123-
"to": email_msg['To'],
124-
"cc": email_msg['Cc'],
121+
"from": email_msg["From"],
122+
"date": email_msg["Date"],
123+
"to": email_msg["To"],
124+
"cc": email_msg["Cc"],
125125
}
126126
)
127127
return results

libs/community/tests/unit_tests/graph_vectorstores/extractors/test_hierarchy_link_extractor.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ def test_up_only() -> None:
1414

1515
assert extractor.extract_one(PATH_1) == {
1616
# Path1 links up to Root/H1
17-
Link.outgoing(kind="hierarchy", tag="up:Root/H1"),
17+
Link.outgoing(kind="hierarchy", tag="p:Root/H1"),
1818
# Path1 is linked to by stuff under Root/H1/h2
19-
Link.incoming(kind="hierarchy", tag="up:Root/H1/h2"),
19+
Link.incoming(kind="hierarchy", tag="p:Root/H1/h2"),
2020
}
2121

2222
assert extractor.extract_one(PATH_2) == {
2323
# Path2 links up to Root
24-
Link.outgoing(kind="hierarchy", tag="up:Root"),
24+
Link.outgoing(kind="hierarchy", tag="p:Root"),
2525
# Path2 is linked to by stuff under Root/H1/h2
26-
Link.incoming(kind="hierarchy", tag="up:Root/H1"),
26+
Link.incoming(kind="hierarchy", tag="p:Root/H1"),
2727
}
2828

2929
assert extractor.extract_one(PATH_3) == {
3030
# Path3 is linked to by stuff under Root
31-
Link.incoming(kind="hierarchy", tag="up:Root"),
31+
Link.incoming(kind="hierarchy", tag="p:Root"),
3232
}
3333

3434

@@ -37,31 +37,31 @@ def test_up_and_down() -> None:
3737

3838
assert extractor.extract_one(PATH_1) == {
3939
# Path1 links up to Root/H1
40-
Link.outgoing(kind="hierarchy", tag="up:Root/H1"),
40+
Link.outgoing(kind="hierarchy", tag="p:Root/H1"),
4141
# Path1 is linked to by stuff under Root/H1/h2
42-
Link.incoming(kind="hierarchy", tag="up:Root/H1/h2"),
42+
Link.incoming(kind="hierarchy", tag="p:Root/H1/h2"),
4343
# Path1 links down to things under Root/H1/h2.
44-
Link.outgoing(kind="hierarchy", tag="down:Root/H1/h2"),
44+
Link.outgoing(kind="hierarchy", tag="c:Root/H1/h2"),
4545
# Path1 is linked down to by Root/H1
46-
Link.incoming(kind="hierarchy", tag="down:Root/H1"),
46+
Link.incoming(kind="hierarchy", tag="c:Root/H1"),
4747
}
4848

4949
assert extractor.extract_one(PATH_2) == {
5050
# Path2 links up to Root
51-
Link.outgoing(kind="hierarchy", tag="up:Root"),
51+
Link.outgoing(kind="hierarchy", tag="p:Root"),
5252
# Path2 is linked to by stuff under Root/H1/h2
53-
Link.incoming(kind="hierarchy", tag="up:Root/H1"),
53+
Link.incoming(kind="hierarchy", tag="p:Root/H1"),
5454
# Path2 links down to things under Root/H1.
55-
Link.outgoing(kind="hierarchy", tag="down:Root/H1"),
55+
Link.outgoing(kind="hierarchy", tag="c:Root/H1"),
5656
# Path2 is linked down to by Root
57-
Link.incoming(kind="hierarchy", tag="down:Root"),
57+
Link.incoming(kind="hierarchy", tag="c:Root"),
5858
}
5959

6060
assert extractor.extract_one(PATH_3) == {
6161
# Path3 is linked to by stuff under Root
62-
Link.incoming(kind="hierarchy", tag="up:Root"),
62+
Link.incoming(kind="hierarchy", tag="p:Root"),
6363
# Path3 links down to things under Root/H1.
64-
Link.outgoing(kind="hierarchy", tag="down:Root"),
64+
Link.outgoing(kind="hierarchy", tag="c:Root"),
6565
}
6666

6767

@@ -70,15 +70,15 @@ def test_sibling() -> None:
7070

7171
assert extractor.extract_one(PATH_1) == {
7272
# Path1 links with anything else in Root/H1
73-
Link.bidir(kind="hierarchy", tag="sib:Root/H1"),
73+
Link.bidir(kind="hierarchy", tag="s:Root/H1"),
7474
}
7575

7676
assert extractor.extract_one(PATH_2) == {
7777
# Path2 links with anything else in Root
78-
Link.bidir(kind="hierarchy", tag="sib:Root"),
78+
Link.bidir(kind="hierarchy", tag="s:Root"),
7979
}
8080

8181
assert extractor.extract_one(PATH_3) == {
8282
# Path3 links with anything else at the top level
83-
Link.bidir(kind="hierarchy", tag="sib:"),
83+
Link.bidir(kind="hierarchy", tag="s:"),
8484
}

0 commit comments

Comments
 (0)