Skip to content

Fix orderdict, improve types #1304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 31, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update base.py
  • Loading branch information
Yobmod authored Jul 31, 2021
commit b76b99184e8f0e16ba66a730846f3d61c72061fe
8 changes: 4 additions & 4 deletions git/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,14 +422,14 @@ def _to_full_tag_path(path):

def create_head(self, path: PathLike, commit: str = 'HEAD',
force: bool = False, logmsg: Optional[str] = None
) -> Head:
) -> 'Head':
"""Create a new head within the repository.
For more documentation, please see the Head.create method.

:return: newly created Head Reference"""
return Head.create(self, path, commit, logmsg, force)

def delete_head(self, *heads: 'SymbolicReference', **kwargs: Any) -> None:
def delete_head(self, *heads: 'Head', **kwargs: Any) -> None:
"""Delete the given heads

:param kwargs: Additional keyword arguments to be passed to git-branch"""
Expand Down Expand Up @@ -788,10 +788,10 @@ def ignored(self, *paths: PathLike) -> List[PathLike]:
return proc.replace("\\\\", "\\").replace('"', "").split("\n")

@property
def active_branch(self) -> 'SymbolicReference':
def active_branch(self) -> Head:
"""The name of the currently active branch.

:return: Head to the active branch"""
# reveal_type(self.head.reference) # => Reference
return self.head.reference

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