Browse Source

Fix formatting.

Jelmer Vernooij 5 năm trước cách đây
mục cha
commit
de12f39702

+ 1 - 0
dulwich/client.py

@@ -54,6 +54,7 @@ from urllib.parse import (
     urljoin,
     urlunparse,
     urlunsplit,
+    urlunparse,
     )
 
 import dulwich

+ 4 - 4
dulwich/objects.py

@@ -158,7 +158,7 @@ def object_header(num_type: int, length: int) -> bytes:
             b' ' + str(length).encode('ascii') + b'\0')
 
 
-def serializable_property(name: str, docstring:Optional[str]=None):
+def serializable_property(name: str, docstring: Optional[str] = None):
     """A property that helps tracking whether serialization is necessary.
     """
     def set(obj, value):
@@ -259,8 +259,8 @@ class ShaFile(object):
 
     __slots__ = ('_chunked_text', '_sha', '_needs_serialization')
 
-    type_name:bytes
-    type_num:int
+    type_name: bytes
+    type_num: int
 
     @staticmethod
     def _parse_legacy_object_header(magic, f):
@@ -1426,7 +1426,7 @@ OBJECT_CLASSES = (
     Tag,
     )
 
-_TYPE_MAP:Dict[Union[bytes,int],Type[ShaFile]] = {}
+_TYPE_MAP: 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: Tuple[int, ...] = (1, 6, 6)
 
     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: Tuple[int, ...] = (1, 5, 0)
 
     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: Type[HTTPGitRequest] = TestHTTPGitRequest
 
     def setUp(self):
         super(WebTestCase, self).setUp()