Fokko commented on code in PR #922: URL: https://github.com/apache/iceberg-python/pull/922#discussion_r1676882347
########## pyiceberg/io/__init__.py: ########## @@ -320,6 +331,13 @@ def _infer_file_io_from_scheme(path: str, properties: Properties) -> Optional[Fi return None +def _get_first_property_value(properties: Properties, property_names: Tuple[str, ...]) -> Optional[Any]: Review Comment: I find this PR very hard to read with all the constants. I would like to do a suggestion, how about changing the signature to: ```suggestion def _get_first_property_value(properties: Properties, *property_names: str) -> Optional[Any]: ``` And avoid the additional constant with the grouped values: ```python _get_first_property_value(self.properties, S3_ACCESS_KEY_ID_PROPERTIES) ``` Instead, write: ```python _get_first_property_value(self.properties, S3_ACCESS_KEY_ID, AWS_ACCESS_KEY_ID) ``` The `S3_ACCESS_KEY_ID_PROPERTIES` seemed to be used just once. WDYT? -- 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