From 894a4dc0755b30c91c802546d942cf67a67978e0 Mon Sep 17 00:00:00 2001 From: Sebastian Hamann Date: Fri, 2 May 2025 13:27:32 +0200 Subject: [PATCH] Fix type annotations for clone_repository --- pygit2/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pygit2/__init__.py b/pygit2/__init__.py index e74eb9cd..d4394373 100644 --- a/pygit2/__init__.py +++ b/pygit2/__init__.py @@ -155,12 +155,12 @@ def init_repository( def clone_repository( - url: str, - path: str, + url: str | bytes | os.PathLike, + path: str | bytes | os.PathLike, bare: bool = False, repository: typing.Callable | None = None, remote: typing.Callable | None = None, - checkout_branch: str | None = None, + checkout_branch: str | bytes | None = None, callbacks: RemoteCallbacks | None = None, depth: int = 0, proxy: None | bool | str = None, @@ -172,9 +172,9 @@ def clone_repository( Parameters: - url : str + url : str or bytes or pathlike object URL of the repository to clone. - path : str + path : str or bytes or pathlike object Local path to clone into. bare : bool Whether the local repository should be bare. @@ -190,7 +190,7 @@ def clone_repository( The repository callback has `(path, bare) -> Repository` as a signature. The Repository it returns will be used instead of creating a new one. - checkout_branch : str + checkout_branch : str or bytes Branch to checkout after the clone. The default is to use the remote's default branch. callbacks : RemoteCallbacks