| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c9952e1 commit b8a25df
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -189,7 +189,7 @@ def _process_diff_args( | |||
| 189 | 189 | ||
| 190 | 190 | def diff( | |
| 191 | 191 | self, | |
| 192 | - other: Union[Literal[DiffConstants.INDEX], "Tree", "Commit", str, None] = INDEX, | ||
| 192 | + other: Union[DiffConstants, "Tree", "Commit", str, None] = INDEX, | ||
| 193 | 193 | paths: Union[PathLike, List[PathLike], Tuple[PathLike, ...], None] = None, | |
| 194 | 194 | create_patch: bool = False, | |
| 195 | 195 | **kwargs: Any, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1475,10 +1475,13 @@ def reset( | |||
| 1475 | 1475 | ||
| 1476 | 1476 | return self | |
| 1477 | 1477 | ||
| 1478 | - # @ default_index, breaks typing for some reason, copied into function | ||
| 1478 | + # FIXME: This is documented to accept the same parameters as Diffable.diff, but this | ||
| 1479 | + # does not handle NULL_TREE for `other`. (The suppressed mypy error is about this.) | ||
| 1479 | 1480 | def diff( | |
| 1480 | 1481 | self, | |
| 1481 | - other: Union[Literal[git_diff.DiffConstants.INDEX], "Tree", "Commit", str, None] = git_diff.INDEX, | ||
| 1482 | + other: Union[ # type: ignore[override] | ||
| 1483 | + Literal[git_diff.DiffConstants.INDEX], "Tree", "Commit", str, None | ||
| 1484 | + ] = git_diff.INDEX, | ||
| 1482 | 1485 | paths: Union[PathLike, List[PathLike], Tuple[PathLike, ...], None] = None, | |
| 1483 | 1486 | create_patch: bool = False, | |
| 1484 | 1487 | **kwargs: Any, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments