瀏覽代碼

Fix more types not compatible with py3.5.

Jelmer Vernooij 4 年之前
父節點
當前提交
4fa76cfe2e
共有 4 個文件被更改,包括 4 次插入4 次删除
  1. 1 1
      dulwich/objects.py
  2. 1 1
      dulwich/tests/compat/test_web.py
  3. 1 1
      dulwich/tests/compat/utils.py
  4. 1 1
      dulwich/tests/test_web.py

+ 1 - 1
dulwich/objects.py

@@ -1425,7 +1425,7 @@ OBJECT_CLASSES = (
     Tag,
     )
 
-_TYPE_MAP: Dict[Union[bytes, int], Type[ShaFile]] = {}
+_TYPE_MAP = {}  # type: Dict[Union[bytes, int], Type[ShaFile]]
 
 for cls in OBJECT_CLASSES:
     _TYPE_MAP[cls.type_name] = cls

+ 1 - 1
dulwich/tests/compat/test_web.py

@@ -88,7 +88,7 @@ class SmartWebTestCase(WebTests, CompatTestCase):
     This server test case does not use side-band-64k in git-receive-pack.
     """
 
-    min_git_version: Tuple[int, ...] = (1, 6, 6)
+    min_git_version = (1, 6, 6)  # type: Tuple[int, ...]
 
     def _handlers(self):
         return {b'git-receive-pack': NoSideBand64kReceivePackHandler}

+ 1 - 1
dulwich/tests/compat/utils.py

@@ -216,7 +216,7 @@ class CompatTestCase(TestCase):
     min_git_version.
     """
 
-    min_git_version: Tuple[int, ...] = (1, 5, 0)
+    min_git_version = (1, 5, 0)  # type: Tuple[int, ...]
 
     def setUp(self):
         super(CompatTestCase, self).setUp()

+ 1 - 1
dulwich/tests/test_web.py

@@ -108,7 +108,7 @@ class TestHTTPGitRequest(HTTPGitRequest):
 class WebTestCase(TestCase):
     """Base TestCase with useful instance vars and utility functions."""
 
-    _req_class: Type[HTTPGitRequest] = TestHTTPGitRequest
+    _req_class = TestHTTPGitRequest  # type: Type[HTTPGitRequest]
 
     def setUp(self):
         super(WebTestCase, self).setUp()