Pārlūkot izejas kodu

Merge branch 'master' into merge-new

Jelmer Vernooij 2 nedēļas atpakaļ
vecāks
revīzija
c58fa9de69
2 mainītis faili ar 6 papildinājumiem un 3 dzēšanām
  1. 3 0
      NEWS
  2. 3 3
      dulwich/client.py

+ 3 - 0
NEWS

@@ -24,6 +24,9 @@
 
  * Add basic merge command. (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,