summaryrefslogtreecommitdiff
path: root/git/refs/remote.py
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2022-05-18 07:43:53 +0800
committerSebastian Thiel <sebastian.thiel@icloud.com>2022-05-18 07:43:53 +0800
commit21ec529987d10e0010badd37f8da3274167d436f (patch)
treea3394cfe902ce7edd07c89420c21c13274a2d295 /git/refs/remote.py
parentb30720ee4d9762a03eae4fa7cfa4b0190d81784d (diff)
downloadgitpython-21ec529987d10e0010badd37f8da3274167d436f.tar.gz
Run everything through 'black'
That way people who use it won't be deterred, while it unifies style everywhere.
Diffstat (limited to 'git/refs/remote.py')
-rw-r--r--git/refs/remote.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/git/refs/remote.py b/git/refs/remote.py
index 1b416bd0..8ac6bcd2 100644
--- a/git/refs/remote.py
+++ b/git/refs/remote.py
@@ -23,12 +23,18 @@ if TYPE_CHECKING:
class RemoteReference(Head):
"""Represents a reference pointing to a remote head."""
+
_common_path_default = Head._remote_common_path_default
@classmethod
- def iter_items(cls, repo: 'Repo', common_path: Union[PathLike, None] = None,
- remote: Union['Remote', None] = None, *args: Any, **kwargs: Any
- ) -> Iterator['RemoteReference']:
+ def iter_items(
+ cls,
+ repo: "Repo",
+ common_path: Union[PathLike, None] = None,
+ remote: Union["Remote", None] = None,
+ *args: Any,
+ **kwargs: Any
+ ) -> Iterator["RemoteReference"]:
"""Iterate remote references, and if given, constrain them to the given remote"""
common_path = common_path or cls._common_path_default
if remote is not None:
@@ -41,9 +47,10 @@ class RemoteReference(Head):
# 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', # type: ignore
- **kwargs: Any) -> None:
+ @classmethod
+ def delete(
+ cls, repo: "Repo", *refs: "RemoteReference", **kwargs: Any # type: ignore
+ ) -> None:
"""Delete the given remote references
:note:
@@ -64,7 +71,7 @@ class RemoteReference(Head):
pass
# END for each ref
- @ classmethod
+ @classmethod
def create(cls, *args: Any, **kwargs: Any) -> NoReturn:
"""Used to disable this method"""
raise TypeError("Cannot explicitly create remote references")