hgollakota commented on issue #1340:
URL:
https://github.com/apache/iceberg-python/issues/1340#issuecomment-2493851999
Hey, gonna submit a pull-request - here's the solution I'm proposing:
```
class FileFormat(str, Enum):
AVRO = "AVRO", "avro"
PARQUET = "PARQUET", "parquet"
ORC = "ORC", "orc"
def __new__(cls, value, *value_aliases):
obj = str.__new__(cls)
obj._value_ = value
for alias in value_aliases:
cls._value2member_map_[alias] = obj
return obj
def __repr__(self) -> str:
"""Return the string representation of the FileFormat class."""
return f"FileFormat.{self.name}"
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]