Fokko commented on code in PR #249:
URL: https://github.com/apache/iceberg-python/pull/249#discussion_r1440884348


##########
pyiceberg/table/__init__.py:
##########
@@ -545,7 +545,7 @@ def new_snapshot_id(self) -> int:
 
     def current_snapshot(self) -> Optional[Snapshot]:
         """Get the current snapshot for this table, or None if there is no 
current snapshot."""
-        if snapshot_id := self.metadata.current_snapshot_id:
+        if (snapshot_id := self.metadata.current_snapshot_id) is not None or 
isinstance(snapshot_id, int):
             return self.snapshot_by_id(snapshot_id)

Review Comment:
   I think the following is easier to read, WDYT?
   ```suggestion
           if self.metadata.current_snapshot_id is not None:
               return self.snapshot_by_id(self.metadata.current_snapshot_id)
   ```



-- 
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-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to