summaryrefslogtreecommitdiff
path: root/git/remote.py
diff options
context:
space:
mode:
authoryobmod <yobmod@gmail.com>2021-05-08 16:37:23 +0100
committeryobmod <yobmod@gmail.com>2021-05-08 16:37:23 +0100
commit6a2f5d05f4a8e3427d6dd2a5981f148a9f6bef84 (patch)
treec90a0b010464fdf025d58328d2679c6ebf01c104 /git/remote.py
parent96f8f17d5d63c0e0c044ac3f56e94a1aa2e45ec3 (diff)
downloadgitpython-6a2f5d05f4a8e3427d6dd2a5981f148a9f6bef84.tar.gz
Add types to Remote. init getattr exists
Diffstat (limited to 'git/remote.py')
-rw-r--r--git/remote.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/git/remote.py b/git/remote.py
index 2eeafcc4..a6c76e19 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -433,7 +433,7 @@ class Remote(LazyMixin, Iterable):
__slots__ = ("repo", "name", "_config_reader")
_id_attribute_ = "name"
- def __init__(self, repo, name):
+ def __init__(self, repo: 'Repo', name: str) -> None:
"""Initialize a remote instance
:param repo: The repository we are a remote of
@@ -441,7 +441,7 @@ class Remote(LazyMixin, Iterable):
self.repo = repo # type: 'Repo'
self.name = name
- def __getattr__(self, attr):
+ def __getattr__(self, attr: str) -> Any:
"""Allows to call this instance like
remote.special( \\*args, \\*\\*kwargs) to call git-remote special self.name"""
if attr == "_config_reader":
@@ -481,7 +481,7 @@ class Remote(LazyMixin, Iterable):
def __hash__(self):
return hash(self.name)
- def exists(self):
+ def exists(self) -> bool:
"""
:return: True if this is a valid, existing remote.
Valid remotes have an entry in the repository's configuration"""