Skip to content

Commit 09037b6

Browse files
committed
fix the merge from main
1 parent d61e131 commit 09037b6

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

graphrag/cache/factory.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
from __future__ import annotations
77

8-
from typing import TYPE_CHECKING, ClassVar
98
from typing import TYPE_CHECKING, ClassVar
109

1110
from graphrag.config.enums import CacheType

graphrag/index/flows/create_final_community_reports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async def create_final_community_reports(
6262
claims = _prep_claims(claims_input)
6363

6464
community_hierarchy = restore_community_hierarchy(nodes)
65-
65+
6666
local_contexts = prepare_community_reports(
6767
nodes,
6868
edges,

graphrag/index/operations/summarize_communities/summarize_communities.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ async def summarize_communities(
5555
"max_input_tokens", defaults.COMMUNITY_REPORT_MAX_INPUT_LENGTH
5656
),
5757
)
58+
5859
async def run_generate(record):
5960
result = await _generate_report(
6061
runner,

graphrag/storage/cosmosdb_pipeline_storage.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from azure.identity import DefaultAzureCredential
1717
from datashaper import Progress
1818

19-
from graphrag.logging.base import ProgressReporter
19+
from graphrag.logger.base import ProgressLogger
2020
from graphrag.storage.pipeline_storage import PipelineStorage
2121

2222
log = logging.getLogger(__name__)
@@ -97,7 +97,7 @@ def find(
9797
self,
9898
file_pattern: re.Pattern[str],
9999
base_dir: str | None = None,
100-
progress: ProgressReporter | None = None,
100+
progress: ProgressLogger | None = None,
101101
file_filter: dict[str, Any] | None = None,
102102
max_count=-1,
103103
) -> Iterator[tuple[str, dict[str, Any]]]:
@@ -186,18 +186,18 @@ async def get(
186186
items_list = list(queried_items)
187187
for item in items_list:
188188
item["id"] = item["id"].split(":")[1]
189-
189+
190190
items_json_str = json.dumps(items_list)
191191

192192
items_df = pd.read_json(
193193
StringIO(items_json_str), orient="records", lines=False
194194
)
195195
return items_df.to_parquet()
196-
196+
197197
item = container_client.read_item(item=key, partition_key=key)
198198
item_body = item.get("body")
199199
return json.dumps(item_body)
200-
200+
201201
except Exception:
202202
log.exception("Error reading item %s", key)
203203
return None
@@ -224,7 +224,7 @@ async def set(self, key: str, value: Any, encoding: str | None = None) -> None:
224224
cosmosdb_item_list = json.loads(value_json)
225225
for cosmosdb_item in cosmosdb_item_list:
226226
# Append an additional prefix to the id to force a unique identifier for the create_final_nodes rows
227-
if (prefix == "create_final_nodes"):
227+
if prefix == "create_final_nodes":
228228
prefixed_id = f"{prefix}-community_{cosmosdb_item['community']}:{cosmosdb_item['id']}"
229229
else:
230230
prefixed_id = f"{prefix}:{cosmosdb_item['id']}"
@@ -250,7 +250,7 @@ async def has(self, key: str) -> bool:
250250
prefix = self._get_prefix(key)
251251
query = f"SELECT * FROM c WHERE STARTSWITH(c.id, '{prefix}')" # noqa: S608
252252
queried_items = container_client.query_items(
253-
query=query, enable_cross_partition_query=True
253+
query=query, enable_cross_partition_query=True
254254
)
255255
return len(list(queried_items)) > 0
256256
return False
@@ -264,7 +264,7 @@ async def delete(self, key: str) -> None:
264264
prefix = self._get_prefix(key)
265265
query = f"SELECT * FROM c WHERE STARTSWITH(c.id, '{prefix}')" # noqa: S608
266266
queried_items = container_client.query_items(
267-
query=query, enable_cross_partition_query=True
267+
query=query, enable_cross_partition_query=True
268268
)
269269
for item in queried_items:
270270
container_client.delete_item(item=item["id"], partition_key=item["id"])
@@ -290,7 +290,7 @@ def keys(self) -> list[str]:
290290
def child(self, name: str | None) -> PipelineStorage:
291291
"""Create a child storage instance."""
292292
return self
293-
293+
294294
def _get_prefix(self, key: str) -> str:
295295
"""Get the prefix of the filename key."""
296296
return key.split(".")[0]

0 commit comments

Comments
 (0)