Skip to content

Commit 35fb5e1

Browse files
committed
typing fix for __init__.py
1 parent e3ed43f commit 35fb5e1

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pygit2/__init__.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@
823823

824824

825825
def init_repository(
826-
path: typing.Union[str, bytes, PathLike, None],
826+
path: typing.Union[str, bytes, PathLike[str], PathLike[bytes], None],
827827
bare: bool = False,
828828
flags: enums.RepositoryInitFlag = enums.RepositoryInitFlag.MKPATH,
829829
mode: typing.Union[
@@ -901,15 +901,15 @@ def init_repository(
901901

902902

903903
def clone_repository(
904-
url,
905-
path,
906-
bare=False,
907-
repository=None,
908-
remote=None,
909-
checkout_branch=None,
910-
callbacks=None,
911-
depth=0,
912-
):
904+
url: str,
905+
path: str,
906+
bare: bool = False,
907+
repository: typing.Callable[[str, bool], Repository] | None = None,
908+
remote: typing.Callable[[Repository, str, str], Remote] | None = None,
909+
checkout_branch: str | None = None,
910+
callbacks: RemoteCallbacks | None = None,
911+
depth: int = 0,
912+
) -> Repository:
913913
"""
914914
Clones a new Git repository from *url* in the given *path*.
915915

0 commit comments

Comments
 (0)