Skip to content

Commit 5b20fcf

Browse files
Fix type hints
1 parent 2ca949b commit 5b20fcf

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

pyathena/async_cursor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def _collect_result_set(self, query_id: str) -> AthenaResultSet:
9797
def execute(
9898
self,
9999
operation: str,
100-
parameters: Optional[Dict[str, Any]] = None,
100+
parameters: Optional[Union[Dict[str, Any], List[str]]] = None,
101101
work_group: Optional[str] = None,
102102
s3_staging_dir: Optional[str] = None,
103103
cache_size: Optional[int] = 0,

pyathena/pandas/cursor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ def execute(
182182
return self
183183

184184
def executemany(
185-
self, operation: str, seq_of_parameters: List[Optional[Dict[str, Any]]], **kwargs
185+
self,
186+
operation: str,
187+
seq_of_parameters: List[Optional[Union[Dict[str, Any], List[str]]]],
188+
**kwargs,
186189
) -> None:
187190
for parameters in seq_of_parameters:
188191
self.execute(operation, parameters, **kwargs)

pyathena/spark/common.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,10 @@ def close(self) -> None:
217217
self._terminate_session()
218218

219219
def executemany(
220-
self, operation: str, seq_of_parameters: List[Optional[Dict[str, Any]]], **kwargs
220+
self,
221+
operation: str,
222+
seq_of_parameters: List[Optional[Union[Dict[str, Any], List[str]]]],
223+
**kwargs,
221224
) -> None:
222225
raise NotSupportedError
223226

pyathena/sqlalchemy/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33

44
class _HashableDict(dict): # type: ignore
5-
def __hash__(self):
5+
def __hash__(self): # type: ignore
66
return hash(tuple(sorted(self.items())))

0 commit comments

Comments
 (0)