Fokko commented on code in PR #2593:
URL: https://github.com/apache/iceberg-python/pull/2593#discussion_r2454474684
##########
pyiceberg/expressions/__init__.py:
##########
@@ -341,20 +341,25 @@ def __getnewargs__(self) -> Tuple[BooleanExpression,
BooleanExpression]:
return (self.left, self.right)
-class Not(BooleanExpression):
+class Not(IcebergBaseModel, BooleanExpression):
"""NOT operation expression - logical negation."""
- child: BooleanExpression
+ model_config = ConfigDict(arbitrary_types_allowed=True)
+
+ type: TypingLiteral["not"] = Field(default="not")
+ child: BooleanExpression = Field()
+
+ def __init__(self, child: BooleanExpression, **_) -> None:
Review Comment:
```suggestion
def __init__(self, child: BooleanExpression, **_: Any) -> None:
```
##########
pyiceberg/expressions/__init__.py:
##########
@@ -341,20 +341,25 @@ def __getnewargs__(self) -> Tuple[BooleanExpression,
BooleanExpression]:
return (self.left, self.right)
-class Not(BooleanExpression):
+class Not(IcebergBaseModel, BooleanExpression):
"""NOT operation expression - logical negation."""
- child: BooleanExpression
+ model_config = ConfigDict(arbitrary_types_allowed=True)
+
+ type: TypingLiteral["not"] = Field(default="not")
+ child: BooleanExpression = Field()
+
+ def __init__(self, child: BooleanExpression, **_) -> None:
+ super().__init__(child=child)
- def __new__(cls, child: BooleanExpression) -> BooleanExpression: # type:
ignore
+ def __new__(cls, child: BooleanExpression, **_) -> BooleanExpression: #
type: ignore
Review Comment:
```suggestion
def __new__(cls, child: BooleanExpression, **_: Any) ->
BooleanExpression: # type: ignore
```
--
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]