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/11/21 16:59:46 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #6232: Python: Disallow Any generics

rdblue commented on code in PR #6232:
URL: https://github.com/apache/iceberg/pull/6232#discussion_r1028308314


##########
python/pyiceberg/expressions/literals.py:
##########
@@ -207,7 +207,7 @@ def __init__(self, value: int):
         super().__init__(value, int)
 
     @singledispatchmethod
-    def to(self, type_var: IcebergType) -> Literal:
+    def to(self, type_var: IcebergType) -> Literal:  # type: ignore

Review Comment:
   Is there no way to return an unknown type from a method in Python? In Java, we would just declare that the method returns `Literal<T>` where `T` comes from context. Then you get a type that may not be correct, but is at least not `<nothing>`.



-- 
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