@@ -352,7 +352,7 @@ class TargetVersion(StrEnum):
352352class JSONMetadata (json .JSONEncoder ):
353353 """Custom JSON encoder for metadata serialization."""
354354
355- def default (self , o : Any ) -> str :
355+ def default (self , o : Any ) -> Any :
356356 if isinstance (o , Matrix ):
357357 return o .matrix ()
358358
@@ -661,11 +661,7 @@ def new_commits_matrix(self) -> Matrix | None:
661661 @cached_property
662662 def new_commits_hash (self ) -> tuple [str , ...] | None :
663663 """List all hashes of new commits."""
664- return (
665- cast (tuple [str , ...], self .new_commits_matrix ["commit" ])
666- if self .new_commits_matrix
667- else None
668- )
664+ return self .new_commits_matrix ["commit" ] if self .new_commits_matrix else None
669665
670666 @cached_property
671667 def release_commits (self ) -> tuple [Commit , ...] | None :
@@ -699,7 +695,7 @@ def release_commits_matrix(self) -> Matrix | None:
699695 def release_commits_hash (self ) -> tuple [str , ...] | None :
700696 """List all hashes of release commits."""
701697 return (
702- cast ( tuple [ str , ...], self .release_commits_matrix ["commit" ])
698+ self .release_commits_matrix ["commit" ]
703699 if self .release_commits_matrix
704700 else None
705701 )
0 commit comments