Skip to content

Commit a97c55c

Browse files
Add comment to walrus operator
1 parent 3a2ef1e commit a97c55c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

bdiff/git_bdiff.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def get_branch_name(self):
6363
"""Get the name of the current branch."""
6464
result = None
6565
for line in self.run_git(["branch", "--show-current"]):
66+
# Set m to self._branch_pattern result
67+
# Then check m evaluates to True
6668
if m := self._branch_pattern.match(line):
6769
result = m.group(1)
6870
break

0 commit comments

Comments
 (0)