summaryrefslogtreecommitdiff
path: root/git/refs/remote.py
diff options
context:
space:
mode:
authorDominic <yobmod@gmail.com>2021-09-24 03:52:16 +0100
committerGitHub <noreply@github.com>2021-09-24 03:52:16 +0100
commit1746b971387eccfc6fb4e34d3c334079bbb14b2e (patch)
treecd6d4a755c41c203b6d1c14996d0025318579efc /git/refs/remote.py
parent2d15c5a601e698e8f7859e821950cad0701b756d (diff)
parent5f4b4dbff46fae4c899f5573aea5a7266a41eeeb (diff)
downloadgitpython-1746b971387eccfc6fb4e34d3c334079bbb14b2e.tar.gz
Merge pull request #1346 from rra/type-fixes
Fix typing issues with delete_head and Remote.add
Diffstat (limited to 'git/refs/remote.py')
-rw-r--r--git/refs/remote.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/git/refs/remote.py b/git/refs/remote.py
index 9b74d87f..1b416bd0 100644
--- a/git/refs/remote.py
+++ b/git/refs/remote.py
@@ -37,8 +37,13 @@ class RemoteReference(Head):
# super is Reference
return super(RemoteReference, cls).iter_items(repo, common_path)
+ # The Head implementation of delete also accepts strs, but this
+ # implementation does not. mypy doesn't have a way of representing
+ # tightening the types of arguments in subclasses and recommends Any or
+ # "type: ignore". (See https://github.com/python/typing/issues/241)
@ classmethod
- def delete(cls, repo: 'Repo', *refs: 'RemoteReference', **kwargs: Any) -> None:
+ def delete(cls, repo: 'Repo', *refs: 'RemoteReference', # type: ignore
+ **kwargs: Any) -> None:
"""Delete the given remote references
:note: