Prechádzať zdrojové kódy

Add type hint for get_ssh_vendor. Fixes #1471

Jelmer Vernooij 2 týždňov pred
rodič
commit
7ec3e15d1d
2 zmenil súbory, kde vykonal 4 pridanie a 1 odobranie
  1. 3 0
      NEWS
  2. 1 1
      dulwich/client.py

+ 3 - 0
NEWS

@@ -19,6 +19,9 @@
    when the subprocess hasn't terminated when closing
    the channel. (Jelmer Vernooij)
 
+ * Add type hint for ``dulwich.client.get_ssh_vendor``.
+   (Jelmer Vernooij, #1471)
+
 0.22.8	2025-03-02
 
  * Allow passing in plain strings to ``dulwich.porcelain.tag_create``

+ 1 - 1
dulwich/client.py

@@ -2111,7 +2111,7 @@ def ParamikoSSHVendor(**kwargs):
 
 
 # Can be overridden by users
-get_ssh_vendor = SubprocessSSHVendor
+get_ssh_vendor: Callable[[], SSHVendor] = SubprocessSSHVendor
 
 
 class SSHGitClient(TraditionalGitClient):