From 12f6c354ed2d0964135fbe8e5fefd98b967c172c Mon Sep 17 00:00:00 2001 From: Or Hayat Date: Thu, 8 Aug 2024 12:45:16 +0300 Subject: [PATCH] * fixed discover_repository type annotation it return None incase no repository was found * removed unused import of submodule type --- pygit2/_pygit2.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygit2/_pygit2.pyi b/pygit2/_pygit2.pyi index 55785063..a73da2a3 100644 --- a/pygit2/_pygit2.pyi +++ b/pygit2/_pygit2.pyi @@ -1,6 +1,6 @@ from typing import Iterator, Literal, Optional, overload from io import IOBase -from . import Index, Submodule +from . import Index from .enums import ( ApplyLocation, BranchType, @@ -558,7 +558,7 @@ class Worktree: def discover_repository( path: str, across_fs: bool = False, ceiling_dirs: str = ... -) -> str: ... +) -> str | None: ... def hash(data: bytes) -> Oid: ... def hashfile(path: str) -> Oid: ... def init_file_backend(path: str, flags: int = 0) -> object: ...