Sfoglia il codice sorgente

Merge branch 'master' into timeout

Jelmer Vernooij 2 settimane fa
parent
commit
1ed8cc29f1
2 ha cambiato i file con 6 aggiunte e 3 eliminazioni
  1. 3 0
      NEWS
  2. 3 3
      dulwich/client.py

+ 3 - 0
NEWS

@@ -19,6 +19,9 @@
    when the subprocess hasn't terminated when closing
    the channel. (Jelmer Vernooij)
 
+* Fix typing for ``dulwich.client`` methods that take repositories.
+   (Jelmer Vernooij, #1521)
+
 0.22.8	2025-03-02
 
  * Allow passing in plain strings to ``dulwich.porcelain.tag_create``

+ 3 - 3
dulwich/client.py

@@ -129,7 +129,7 @@ from .refs import (
     read_info_refs,
     split_peeled_refs,
 )
-from .repo import Repo
+from .repo import BaseRepo, Repo
 
 # Default ref prefix, used if none is specified.
 # GitHub defaults to just sending HEAD if no ref-prefix is
@@ -922,7 +922,7 @@ class GitClient:
     def fetch(
         self,
         path: str,
-        target: Repo,
+        target: BaseRepo,
         determine_wants: Optional[
             Callable[[dict[bytes, bytes], Optional[int]], list[bytes]]
         ] = None,
@@ -1831,7 +1831,7 @@ class LocalGitClient(GitClient):
     def fetch(
         self,
         path: str,
-        target: Repo,
+        target: BaseRepo,
         determine_wants: Optional[
             Callable[[dict[bytes, bytes], Optional[int]], list[bytes]]
         ] = None,