Programmer-RD-AI commented on code in PR #54657:
URL: https://github.com/apache/airflow/pull/54657#discussion_r2286712086
##########
providers/common/io/src/airflow/providers/common/io/xcom/backend.py:
##########
@@ -51,13 +51,21 @@ def _get_compression_suffix(compression: str) -> str:
"""
Return the compression suffix for the given compression.
- :raises ValueError: if the compression is not supported
+ :raises ValueError: if the compression is not supported or no compression
is available
"""
- for suffix, c in fsspec.utils.compressions.items():
- if c == compression:
- return suffix
+ available = fsspec.available_compressions() # returns list
Review Comment:
```suggestion
available: list = fsspec.available_compressions()
```
nit: a type hint might be cleaner than a comment for understanding the type
of data returned from the function
--
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]