浏览代码

Fix typing.

Jelmer Vernooij 2 年之前
父节点
当前提交
7c4f65b680
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      dulwich/pack.py
  2. 2 2
      dulwich/walk.py

+ 1 - 1
dulwich/pack.py

@@ -1029,7 +1029,7 @@ class PackStreamReader:
             # read buffer and (20 - N) come from the wire.
             self.read(20)
 
-        pack_sha = bytearray(self._trailer)
+        pack_sha = bytearray(self._trailer)  # type: ignore
         if pack_sha != self.sha.digest():
             raise ChecksumMismatch(sha_to_hex(pack_sha), self.sha.hexdigest())
 

+ 2 - 2
dulwich/walk.py

@@ -24,7 +24,7 @@
 import collections
 import heapq
 from itertools import chain
-from typing import List, Tuple, Set, Deque, Literal, Optional
+from typing import List, Tuple, Set, Deque, Optional
 
 from dulwich.diff_tree import (
     RENAME_CHANGE_TYPES,
@@ -244,7 +244,7 @@ class Walker:
         store,
         include: List[bytes],
         exclude: Optional[List[bytes]] = None,
-        order: Literal["date", "topo"] = 'date',
+        order: str = 'date',
         reverse: bool = False,
         max_entries: Optional[int] = None,
         paths: Optional[List[bytes]] = None,