Skip to content

Commit

Permalink
chore: update type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwotherspoon committed Oct 17, 2024
1 parent 84d2a81 commit 7d74821
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/langchain_google_cloud_sql_mysql/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import requests
import sqlalchemy
from google.cloud.sql.connector import Connector, RefreshStrategy
from sqlalchemy.engine.row import RowMapping
from sqlalchemy.engine.row import Row, RowMapping

from .version import __version__

Expand Down Expand Up @@ -244,9 +244,7 @@ def _fetch(self, query: str, params: Optional[dict] = None) -> Sequence[RowMappi
result_fetch = result_map.fetchall()
return result_fetch

def _fetch_rows(
self, query: str, params: Optional[dict] = None
) -> Sequence[RowMapping]:
def _fetch_rows(self, query: str, params: Optional[dict] = None) -> Sequence[Row]:
"""Fetch results from a SQL query as rows."""
with self.engine.connect() as conn:
result = conn.execute(sqlalchemy.text(query), params)
Expand Down

0 comments on commit 7d74821

Please sign in to comment.