Skip to content

Commit d7ff762

Browse files
committed
First argument must be the function + ruff
1 parent cf6662c commit d7ff762

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/neo4j_graphrag/experimental/pipeline/kg_builder.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ async def run_async(
126126
"""
127127
return await self.runner.run({"file_path": file_path, "text": text})
128128

129-
def run(self, file_path: Optional[str] = None, text: Optional[str] = None) -> PipelineResult:
129+
def run(
130+
self, file_path: Optional[str] = None, text: Optional[str] = None
131+
) -> PipelineResult:
130132
"""Run pipeline synchronously"""
131-
return run_sync(self, file_path=file_path, text=text)
133+
return run_sync(self.run_async, file_path=file_path, text=text)

src/neo4j_graphrag/utils.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
# limitations under the License.
1515
from __future__ import annotations
1616

17-
from functools import wraps
18-
from typing import Optional
1917
import asyncio
2018
import concurrent.futures
19+
from functools import wraps
20+
from typing import Optional
2121

2222

2323
def validate_search_query_input(
@@ -38,4 +38,5 @@ def async_to_sync(func):
3838
@wraps(func)
3939
def wrapper(*args, **kwargs):
4040
return run_sync(func, *args, **kwargs)
41+
4142
return wrapper

0 commit comments

Comments
 (0)