From 1cf7e92aa310456945ae7da16f253b1331027a5b Mon Sep 17 00:00:00 2001 From: Patrick Gerard Date: Sat, 20 Aug 2022 12:37:48 +0100 Subject: docs: add typerror exception to active_branch method --- git/repo/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git/repo/base.py b/git/repo/base.py index 5a85cc4e..0fed0e4e 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -858,6 +858,8 @@ class Repo(object): @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 -- cgit v1.2.1