Fokko commented on code in PR #6128:
URL: https://github.com/apache/iceberg/pull/6128#discussion_r1015064168
##########
python/pyiceberg/expressions/__init__.py:
##########
@@ -68,7 +72,6 @@ def eval(self, struct: StructProtocol) -> T: # pylint:
disable=W0613
"""Returns the value at the referenced field's position in an object
that abides by the StructProtocol"""
-@dataclass(frozen=True)
Review Comment:
The rationale is in the PR description. Mostly because my IDE lights up as a
Christmas tree, and it is a bit early. It seems that the dataclasses + IDE +
mypy don't really know what to do with the inheritance of the different classes.

A very slimmed-down example is given in the post around `Reference`:

PyCharm is unable to figure out the argument:

It turns out that you shouldn't use positional arguments with data classes:
https://medium.com/@aniscampos/python-dataclass-inheritance-finally-686eaf60fbb5
--
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]