File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments