Skip to content

Commit 5ca3137

Browse files
author
codegen-bot
committed
Update types
1 parent 421a73b commit 5ca3137

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/codegen/sdk/codebase/diff_lite.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class DiffLite(NamedTuple):
4040

4141
change_type: ChangeType
4242
path: Path
43-
rename_from: str | None = None
44-
rename_to: str | None = None
43+
rename_from: Path | None = None
44+
rename_to: Path | None = None
4545
old_content: bytes | None = None
4646

4747
@classmethod
@@ -58,9 +58,9 @@ def from_git_diff(cls, git_diff: Diff):
5858
old = git_diff.a_blob.data_stream.read()
5959
return cls(
6060
change_type=ChangeType.from_git_change_type(git_diff.change_type),
61-
path=Path(git_diff.a_path),
62-
rename_from=git_diff.rename_from,
63-
rename_to=git_diff.rename_to,
61+
path=Path(git_diff.a_path) if git_diff.a_path else None,
62+
rename_from=Path(git_diff.rename_from) if git_diff.rename_from else None,
63+
rename_to=Path(git_diff.rename_to) if git_diff.rename_to else None,
6464
old_content=old,
6565
)
6666

0 commit comments

Comments
 (0)