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/09 06:36:33 UTC

[GitHub] [iceberg] Fokko commented on a diff in pull request #4728: Remove mypy error

Fokko commented on code in PR #4728:
URL: https://github.com/apache/iceberg/pull/4728#discussion_r867672939


##########
python/src/iceberg/transforms.py:
##########
@@ -120,9 +120,6 @@ def hash(self, value: S) -> int:
         raise NotImplementedError()
 
     def apply(self, value: S) -> Optional[int]:
-        if value is None:

Review Comment:
   Since we have `S`, it can never be `None`, otherwise, the signature should be `Optional[S]`. If we want, we can still check if it `None`, `""` or `[]` using:
   ```python
   if not value:
   ```



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