فهرست منبع

Fix python 3.5 compatibility.

Jelmer Vernooij 4 سال پیش
والد
کامیت
ca5e00bcd1
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 2 2
      dulwich/cli.py
  2. 1 1
      dulwich/porcelain.py

+ 2 - 2
dulwich/cli.py

@@ -33,7 +33,7 @@ import sys
 from getopt import getopt
 import optparse
 import signal
-from typing import Dict
+from typing import Dict, Type
 
 from dulwich import porcelain
 from dulwich.client import get_transport_and_path
@@ -545,7 +545,7 @@ class cmd_remote_add(Command):
 
 class SuperCommand(Command):
 
-    subcommands = {}  # type: Dict[str, Command]
+    subcommands = {}  # type: Dict[str, Type[Command]]
 
     def run(self, args):
         if not args:

+ 1 - 1
dulwich/porcelain.py

@@ -890,7 +890,7 @@ def get_remote_repo(
 
     section = (b'remote', encoded_location)
 
-    remote_name: Optional[str]
+    remote_name = None  # type: Optional[str]
 
     if config.has_section(section):
         remote_name = encoded_location.decode()