Copilot commented on code in PR #12323:
URL: https://github.com/apache/gravitino/pull/12323#discussion_r3725876884


##########
clients/client-python/gravitino/dto/audit_dto.py:
##########
@@ -73,7 +114,7 @@ def creator(self) -> str:
         """
         return self._creator
 
-    def create_time(self) -> str:
+    def create_time(self) -> datetime:

Review Comment:
   `create_time()` is annotated to return `datetime`, but the underlying field 
is `Optional[datetime]` and this implementation can return `None` (e.g., when 
`createTime` is omitted, or when constructing `AuditDTO(_creator=...)`). This 
makes the public contract inconsistent with actual behavior and will mislead 
type checkers/users. Consider updating the `Audit` interface and all 
implementations to return `Optional[datetime]`, and update the docstring 
accordingly (or alternatively enforce non-null audit timestamps everywhere if 
they are required).
   
   This issue also appears on line 132 of the same file.



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

Reply via email to