Skip to content

Commit

Permalink
Apply Ruff auto-fixes not included in merge
Browse files Browse the repository at this point in the history
  • Loading branch information
EliahKagan committed Mar 14, 2024
1 parent 0b99041 commit 011cb0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions git/index/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1467,9 +1467,7 @@ def reset(
# does not handle NULL_TREE for `other`. (The suppressed mypy error is about this.)
def diff(
self,
other: Union[ # type: ignore[override]
Literal[git_diff.DiffConstants.INDEX], "Tree", "Commit", str, None
] = git_diff.INDEX,
other: Union[Literal[git_diff.DiffConstants.INDEX], "Tree", "Commit", str, None] = git_diff.INDEX, # type: ignore[override]
paths: Union[PathLike, List[PathLike], Tuple[PathLike, ...], None] = None,
create_patch: bool = False,
**kwargs: Any,
Expand Down
6 changes: 2 additions & 4 deletions git/repo/fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,11 @@ def short_to_long(odb: "GitCmdObjectDB", hexsha: str) -> Optional[bytes]:


@overload
def name_to_object(repo: "Repo", name: str, return_ref: Literal[False] = ...) -> AnyGitObject:
...
def name_to_object(repo: "Repo", name: str, return_ref: Literal[False] = ...) -> AnyGitObject: ...


@overload
def name_to_object(repo: "Repo", name: str, return_ref: Literal[True]) -> Union[AnyGitObject, SymbolicReference]:
...
def name_to_object(repo: "Repo", name: str, return_ref: Literal[True]) -> Union[AnyGitObject, SymbolicReference]: ...


def name_to_object(repo: "Repo", name: str, return_ref: bool = False) -> Union[AnyGitObject, SymbolicReference]:
Expand Down

0 comments on commit 011cb0a

Please sign in to comment.