Skip to content

Commit ef48a35

Browse files
committed
Add type to refs.head.delete()
1 parent 62f7881 commit ef48a35

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎git/refs/head.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
__all__ = ["HEAD", "Head"]
2222

2323

24-
def strip_quotes(string):
24+
def strip_quotes(string: str) -> str:
2525
if string.startswith('"') and string.endswith('"'):
2626
return string[1:-1]
2727
return string
@@ -129,14 +129,13 @@ class Head(Reference):
129129
k_config_remote_ref = "merge" # branch to merge from remote
130130

131131
@classmethod
132-
def delete(cls, repo: 'Repo', *heads: 'Head', **kwargs: Any):
132+
def delete(cls, repo: 'Repo', *heads: 'Head', force: bool = False, **kwargs: Any) -> None:
133133
"""Delete the given heads
134134
135135
:param force:
136136
If True, the heads will be deleted even if they are not yet merged into
137137
the main development stream.
138138
Default False"""
139-
force = kwargs.get("force", False)
140139
flag = "-d"
141140
if force:
142141
flag = "-D"

0 commit comments

Comments
 (0)