1111import sys
1212from datetime import datetime
1313from pathlib import Path
14- from typing import List , Optional , Tuple
14+ from typing import List , Tuple
1515
1616
1717def run_command (cmd : List [str ]) -> Tuple [bool , str ]:
@@ -23,15 +23,15 @@ def run_command(cmd: List[str]) -> Tuple[bool, str]:
2323 return False , e .stderr .strip ()
2424
2525
26- def get_latest_tag () -> Optional [ str ] :
26+ def get_latest_tag () -> str | None :
2727 """Get the latest git tag"""
2828 success , output = run_command (["git" , "describe" , "--tags" , "--abbrev=0" ])
2929 if success and output :
3030 return output
3131 return None
3232
3333
34- def get_commits_since_tag (tag : Optional [ str ] = None , max_count : Optional [ int ] = None ) -> List [dict ]:
34+ def get_commits_since_tag (tag : str | None = None , max_count : int | None = None ) -> List [dict ]:
3535 """Get all commits since the specified tag (or all commits if no tag)"""
3636 if tag :
3737 cmd = ["git" , "log" , f"{ tag } ..HEAD" , "--pretty=format:%H|%an|%ae|%ad|%s" , "--date=iso" ]
@@ -108,7 +108,7 @@ def categorize_commit(message: str) -> str:
108108 return "Other"
109109
110110
111- def generate_commit_summary (commits : List [dict ], latest_tag : Optional [ str ] , max_count : Optional [ int ] = None ) -> str :
111+ def generate_commit_summary (commits : List [dict ], latest_tag : str | None , max_count : int | None = None ) -> str :
112112 """Generate a markdown summary of commits for Claude to process"""
113113
114114 if not commits :
0 commit comments