You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/05/18 00:29:25 UTC

[GitHub] [iceberg] samredai commented on a diff in pull request #4797: Python - Fix tox errors for not calling super __init__ on a dataclass

samredai commented on code in PR #4797:
URL: https://github.com/apache/iceberg/pull/4797#discussion_r875371866


##########
python/src/iceberg/types.py:
##########
@@ -208,6 +208,10 @@ def __init__(self, *fields: NestedField, **kwargs):
             fields = kwargs["fields"]
         object.__setattr__(self, "fields", fields)
 
+    # This __post_init__ call is needed as IcebergType is not a dataclass
+    def __post_init__(self):
+        super().__init__()

Review Comment:
   What happens if we call this in the init method right above? Does that interfere with setting this to a frozen dataclass?



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org