Annotate the return type of every function in loop_claude
This commit is contained in:
@@ -17,19 +17,19 @@ class Session:
|
||||
name: str
|
||||
|
||||
|
||||
def session_for(project, paths):
|
||||
def session_for(project, paths) -> Session:
|
||||
# "A " is the human's cue in the session picker that the session is the loop's.
|
||||
name = f"A {project} loop-claude"
|
||||
return Session(id=uuid.uuid5(NAMESPACE, name), claude_code_transcripts=paths.claude_code_transcripts, name=name)
|
||||
|
||||
|
||||
# <claude_code_transcripts>/-home-me-code-log/<session id>.jsonl
|
||||
def transcript_file(session):
|
||||
def transcript_file(session) -> str:
|
||||
hit = glob.glob(os.path.join(glob.escape(str(session.claude_code_transcripts)), "*", f"{session.id}.jsonl"))
|
||||
return hit[0] if hit else ""
|
||||
|
||||
|
||||
def delete_session(session):
|
||||
def delete_session(session) -> None:
|
||||
path = transcript_file(session)
|
||||
if not path:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user