Name each entry shape written_by_human checks, and annotate every parameter in loop_claude
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import pathlib
|
||||
|
||||
from loop_claude.effects import Effects
|
||||
from loop_claude.outcome import Stop
|
||||
|
||||
|
||||
def checkout_root(cwd, effects: Effects) -> str | Stop:
|
||||
def checkout_root(cwd: pathlib.Path, effects: Effects) -> str | Stop:
|
||||
try:
|
||||
found = effects.git(["rev-parse", "--show-toplevel"], str(cwd))
|
||||
except OSError as failure:
|
||||
@@ -12,7 +14,7 @@ def checkout_root(cwd, effects: Effects) -> str | Stop:
|
||||
return found.stdout.strip()
|
||||
|
||||
|
||||
def checkouts(root, effects: Effects) -> list[str]:
|
||||
def checkouts(root: str, effects: Effects) -> list[str]:
|
||||
found = [root]
|
||||
try:
|
||||
listing = effects.git(["worktree", "list", "--porcelain"], root)
|
||||
@@ -23,5 +25,5 @@ def checkouts(root, effects: Effects) -> list[str]:
|
||||
return sorted(set(found))
|
||||
|
||||
|
||||
def project_name(root, code) -> str:
|
||||
def project_name(root: str, code: pathlib.Path) -> str:
|
||||
return root.removeprefix(f"{code}/").lstrip("/")
|
||||
|
||||
Reference in New Issue
Block a user