uranusjr commented on code in PR #31846:
URL: https://github.com/apache/airflow/pull/31846#discussion_r1228518653
##########
airflow/providers/exasol/hooks/exasol.py:
##########
@@ -157,15 +161,39 @@ def get_description(statement: ExaStatement) ->
Sequence[Sequence]:
)
return cols
+ @overload
+ def run(
+ self,
+ sql: str | Iterable[str],
+ autocommit: bool = False,
+ parameters: Iterable | Mapping[str, Any] | None = None,
+ handler: None = None,
+ split_statements: bool = False,
+ return_last: bool = True,
+ ) -> None:
+ ...
+
+ @overload
+ def run(
+ self,
+ sql: str | Iterable[str],
+ autocommit: bool = False,
+ parameters: Iterable | Mapping[str, Any] | None = None,
+ handler: Callable[[Any], T] = None, # type: ignore[assignment]
+ split_statements: bool = False,
+ return_last: bool = True,
+ ) -> T | list[T]:
+ ...
+
def run(
self,
sql: str | Iterable[str],
autocommit: bool = False,
- parameters: Iterable | Mapping | None = None,
- handler: Callable | None = None,
+ parameters: Iterable | Mapping[str, Any] | None = None,
Review Comment:
Annotations in providers can be inaccurate since not all of them are very
often used. I’d say we can just change the annotation and see if anyone
complains.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]