frankcash commented on code in PR #34666:
URL: https://github.com/apache/airflow/pull/34666#discussion_r1340215338
##########
airflow/providers/databricks/hooks/databricks.py:
##########
@@ -526,8 +530,9 @@ def update_repo(self, repo_id: str, json: dict[str, Any])
-> dict:
:param json: payload
:return: metadata from update
"""
- repos_endpoint = ("PATCH", f"api/2.0/repos/{repo_id}")
- return self._do_api_call(repos_endpoint, json)
+ modify_route = lambda tuple, repo_id: (tuple[0],
tuple[1].format(repo_id=repo_id))
+ modified_update_repo_endpoint = modify_route(UPDATE_REPO_ENDPOINT,
repo_id)
+ return self._do_api_call(modified_update_repo_endpoint, json)
def delete_repo(self, repo_id: str):
Review Comment:
A bit out of scope of this PR (potentially) but we should add a type hint
that this function doesn't have a return like this func
https://github.com/apache/airflow/blob/48391a7413c27df6d9a84589d861698c8611c2e0/airflow/providers/databricks/hooks/databricks.py#L446-L453
--
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]