There was an error while loading. Please reload this page.
1 parent 62f7881 commit ef48a35Copy full SHA for ef48a35
1 file changed
git/refs/head.py
@@ -21,7 +21,7 @@
21
__all__ = ["HEAD", "Head"]
22
23
24
-def strip_quotes(string):
+def strip_quotes(string: str) -> str:
25
if string.startswith('"') and string.endswith('"'):
26
return string[1:-1]
27
return string
@@ -129,14 +129,13 @@ class Head(Reference):
129
k_config_remote_ref = "merge" # branch to merge from remote
130
131
@classmethod
132
- def delete(cls, repo: 'Repo', *heads: 'Head', **kwargs: Any):
+ def delete(cls, repo: 'Repo', *heads: 'Head', force: bool = False, **kwargs: Any) -> None:
133
"""Delete the given heads
134
135
:param force:
136
If True, the heads will be deleted even if they are not yet merged into
137
the main development stream.
138
Default False"""
139
- force = kwargs.get("force", False)
140
flag = "-d"
141
if force:
142
flag = "-D"
0 commit comments