Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3514369

Browse files
authoredJul 31, 2021
Update head types in repo/base.py
1 parent 9110b98 commit 3514369

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎git/repo/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,14 +422,14 @@ def _to_full_tag_path(path):
422422

423423
def create_head(self, path: PathLike, commit: str = 'HEAD',
424424
force: bool = False, logmsg: Optional[str] = None
425-
) -> Head:
425+
) -> 'Head':
426426
"""Create a new head within the repository.
427427
For more documentation, please see the Head.create method.
428428
429429
:return: newly created Head Reference"""
430430
return Head.create(self, path, commit, logmsg, force)
431431

432-
def delete_head(self, *heads: 'SymbolicReference', **kwargs: Any) -> None:
432+
def delete_head(self, *heads: 'Head', **kwargs: Any) -> None:
433433
"""Delete the given heads
434434
435435
:param kwargs: Additional keyword arguments to be passed to git-branch"""
@@ -788,10 +788,10 @@ def ignored(self, *paths: PathLike) -> List[PathLike]:
788788
return proc.replace("\\\\", "\\").replace('"', "").split("\n")
789789

790790
@property
791-
def active_branch(self) -> 'SymbolicReference':
791+
def active_branch(self) -> Head:
792792
"""The name of the currently active branch.
793-
794793
:return: Head to the active branch"""
794+
# reveal_type(self.head.reference) # => Reference
795795
return self.head.reference
796796

797797
def blame_incremental(self, rev: TBD, file: TBD, **kwargs: Any) -> Optional[Iterator['BlameEntry']]:

0 commit comments

Comments
 (0)
Please sign in to comment.