Fokko commented on code in PR #486: URL: https://github.com/apache/iceberg-python/pull/486#discussion_r1514258300
########## pyiceberg/catalog/rest.py: ########## @@ -289,12 +291,25 @@ def auth_url(self) -> str: else: return self.url(Endpoints.get_token, prefixed=False) + def _extract_optional_oauth_params(self) -> Dict[str, str]: + set_of_optional_params = {AUDIENCE, RESOURCE} Review Comment: I also like the suggestion, I think we can simplify it a bit more: ```python def _extract_optional_oauth_params(self) -> Dict[str, str]: optional_oauth_param = { SCOPE: self.properties.get(SCOPE) or CATALOG_SCOPE } set_of_optional_params = {AUDIENCE, RESOURCE} for param in set_of_optional_params: if param_value := self.properties.get(param): optional_oauth_param[param] = param_value return optional_oauth_param ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org