3939 literal ,
4040)
4141from pyiceberg .schema import Accessor , Schema
42- from pyiceberg .typedef import L , StructProtocol , IcebergRootModel
42+ from pyiceberg .typedef import IcebergRootModel , L , StructProtocol
4343from pyiceberg .types import DoubleType , FloatType , NestedField
4444from pyiceberg .utils .singleton import Singleton
4545
@@ -361,9 +361,10 @@ def __getnewargs__(self) -> Tuple[BooleanExpression]:
361361 """Pickle the Not class."""
362362 return (self .child ,)
363363
364-
365- class AlwaysTrue (BooleanExpression , Singleton , IcebergRootModel ):
366364 """TRUE expression."""
365+
366+
367+ class AlwaysTrue (BooleanExpression , Singleton , IcebergRootModel [str ]):
367368 root : str = "true"
368369
369370 def __invert__ (self ) -> AlwaysFalse :
@@ -379,8 +380,9 @@ def __repr__(self) -> str:
379380 return "AlwaysTrue()"
380381
381382
382- class AlwaysFalse (BooleanExpression , Singleton , IcebergRootModel ):
383+ class AlwaysFalse (BooleanExpression , Singleton , IcebergRootModel [ str ] ):
383384 """FALSE expression."""
385+
384386 root : str = "false"
385387
386388 def __invert__ (self ) -> AlwaysTrue :
@@ -734,14 +736,14 @@ def bind(self, schema: Schema, case_sensitive: bool = True) -> BoundLiteralPredi
734736
735737 if isinstance (lit , AboveMax ):
736738 if isinstance (self , (LessThan , LessThanOrEqual , NotEqualTo )):
737- return AlwaysTrue () # type: ignore
739+ return AlwaysTrue ()
738740 elif isinstance (self , (GreaterThan , GreaterThanOrEqual , EqualTo )):
739- return AlwaysFalse () # type: ignore
741+ return AlwaysFalse ()
740742 elif isinstance (lit , BelowMin ):
741743 if isinstance (self , (GreaterThan , GreaterThanOrEqual , NotEqualTo )):
742- return AlwaysTrue () # type: ignore
744+ return AlwaysTrue ()
743745 elif isinstance (self , (LessThan , LessThanOrEqual , EqualTo )):
744- return AlwaysFalse () # type: ignore
746+ return AlwaysFalse ()
745747
746748 return self .as_bound (bound_term , lit )
747749
0 commit comments