Skip to content

Improve docs #1481

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 4 commits into from
Aug 21, 2022
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
Next Next commit
docs: add typerror exception to active_branch method
  • Loading branch information
Patrick Gerard committed Aug 20, 2022
commit 1cf7e92aa310456945ae7da16f253b1331027a5b
2 changes: 2 additions & 0 deletions git/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,8 @@ def ignored(self, *paths: PathLike) -> List[str]:
@property
def active_branch(self) -> Head:
"""The name of the currently active branch.

Raises: TypeError – If HEAD is detached
:return: Head to the active branch"""
# reveal_type(self.head.reference) # => Reference
return self.head.reference
Expand Down