dwreeves commented on code in PR #31846:
URL: https://github.com/apache/airflow/pull/31846#discussion_r1228531239
##########
airflow/providers/databricks/hooks/databricks_sql.py:
##########
@@ -138,15 +141,39 @@ def get_conn(self) -> Connection:
)
return self._sql_conn
+ @overload
+ def run(
+ self,
+ sql: str | Iterable[str],
+ autocommit: bool = False,
+ parameters: Iterable | Mapping | None = None,
+ handler: None = None,
+ split_statements: bool = True,
+ return_last: bool = True,
+ ) -> None:
+ ...
+
+ @overload
+ def run(
+ self,
+ sql: str | Iterable[str],
+ autocommit: bool = False,
+ parameters: Iterable | Mapping | None = None,
+ handler: Callable[[Any], T] = None, # type: ignore[assignment]
Review Comment:
Ah I see. PyCharm will use `...` here for the overloaded type. I don't see
that as wrong per se, but I suppose it depends on what user experience you want.
<img width="616" alt="image"
src="https://github.com/apache/airflow/assets/31971762/02dfdf5a-844a-48ba-95e9-852fa09ca4e4">
<img width="554" alt="image"
src="https://github.com/apache/airflow/assets/31971762/daab9dd0-2abc-4a71-9a97-81a02020f71c">
--
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]