From 4740d320c5b37dd00c33ad50c53821ba5db00759 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sat, 13 Jul 2024 18:38:05 +0300 Subject: [PATCH] Bump pygit2 to 1.15.* (#12319) --- stubs/pygit2/METADATA.toml | 2 +- stubs/pygit2/pygit2/repository.pyi | 1 + stubs/pygit2/pygit2/submodules.pyi | 16 +++++++++++----- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/stubs/pygit2/METADATA.toml b/stubs/pygit2/METADATA.toml index f7da69678..17c37a96d 100644 --- a/stubs/pygit2/METADATA.toml +++ b/stubs/pygit2/METADATA.toml @@ -1,4 +1,4 @@ -version = "1.15.0" +version = "1.15.*" upstream_repository = "https://github.com/libgit2/pygit2" requires = ["types-cffi"] diff --git a/stubs/pygit2/pygit2/repository.pyi b/stubs/pygit2/pygit2/repository.pyi index e7ffdbbaf..221b96b66 100644 --- a/stubs/pygit2/pygit2/repository.pyi +++ b/stubs/pygit2/pygit2/repository.pyi @@ -194,6 +194,7 @@ class BaseRepository(_Repository): @property def ident(self) -> tuple[str, str]: ... def set_ident(self, name: bytes | str | None, email: bytes | str | None) -> None: ... + def revert(self, commit: Commit) -> None: ... def revert_commit(self, revert_commit: Commit, our_commit: Commit, mainline: int = 0) -> Index: ... def amend_commit( self, diff --git a/stubs/pygit2/pygit2/submodules.pyi b/stubs/pygit2/pygit2/submodules.pyi index bffb8dde7..4c3c8a245 100644 --- a/stubs/pygit2/pygit2/submodules.pyi +++ b/stubs/pygit2/pygit2/submodules.pyi @@ -9,18 +9,18 @@ class Submodule: def __del__(self) -> None: ... def open(self) -> Repository: ... def init(self, overwrite: bool = False) -> None: ... - def update(self, init: bool = False, callbacks: RemoteCallbacks | None = None) -> None: ... + def update(self, init: bool = False, callbacks: RemoteCallbacks | None = None, depth: int = 0) -> None: ... def reload(self, force: bool = False) -> None: ... @property def name(self) -> str: ... @property def path(self) -> str: ... @property - def url(self) -> str: ... + def url(self) -> str | None: ... @property def branch(self) -> str: ... @property - def head_id(self) -> Oid: ... + def head_id(self) -> Oid | None: ... class SubmoduleCollection: def __init__(self, repository: BaseRepository) -> None: ... @@ -28,10 +28,16 @@ class SubmoduleCollection: def __contains__(self, name: str) -> bool: ... def __iter__(self) -> Iterator[Submodule]: ... def get(self, name: str) -> Submodule | None: ... - def add(self, url: str, path: str, link: bool = True, callbacks: RemoteCallbacks | None = None) -> Submodule: ... + def add( + self, url: str, path: str, link: bool = True, callbacks: RemoteCallbacks | None = None, depth: int = 0 + ) -> Submodule: ... def init(self, submodules: Iterable[str] | None = None, overwrite: bool = False) -> None: ... def update( - self, submodules: Iterable[str] | None = None, init: bool = False, callbacks: RemoteCallbacks | None = None + self, + submodules: Iterable[str] | None = None, + init: bool = False, + callbacks: RemoteCallbacks | None = None, + depth: int = 0, ) -> None: ... def status(self, name: str, ignore: SubmoduleIgnore = ...) -> SubmoduleStatus: ... def cache_all(self) -> None: ...